Hi its possible when you are fill the dropdown i think the class file it self you have to write the code
dropdown.cs class:

 

   public static string drpcountry(DropDownList str1)
    {
        try
        {
             SqlConnection con2 = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings["con"]);
             con2.Open();
            DataSet ds1 = new DataSet();
            string str2 = "select Country_Name,Country_Code from tblcountry order by Country_Name";
            SqlDataAdapter dad1 = new SqlDataAdapter(str2, con2);

            dad1.Fill(ds1);
            str1.DataSource = ds1;
            str1.DataValueField = "Country_Code";
            str1.DataTextField = "Country_Name";
            str1.DataBind ();
            str1.Items.Insert(0, "SELECT");
            str1.Items.Insert(240, "Other");
            return Convert.ToString(str1);
            con2.Close();
        }
        catch (Exception ex)
        {
            return (ex.Message);
        }

    }

 
next you have to call this class in yor pagelod Dropdown.drpcountry(dropdownid)
i think its working fine.......... if you have any doubts let me know.
Regards,
Paddu. 
 
On 10/10/06, eswar <[EMAIL PROTECTED]> wrote:

Hi Everybody,

I have 'country_id' and 'country_name' in my dataset.
Dataset is binded to  'country_id' dropdown.
And now when user selects a country id from the dropdown...i want to
dispaly the country name against the dropdown in label control without
postback on web form.

Ist possible using Atlas.
I am using VS2005.

Please reply its urgent
Thanks inadvance
ESWAR



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ajax.NET Professional" group.

To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]

For more options, visit this group at http://groups.google.com/group/ajaxpro

The latest downloads of Ajax.NET Professional can be found at http://www.ajaxpro.info/

Don't forget to read my blog at http://weblogs.asp.net/mschwarz/

The open source project is now located at
http://www.codeplex.com/Wiki/View.aspx?ProjectName=AjaxPro
-~----------~----~----~----~------~----~------~--~---

Reply via email to