Click to See Complete Forum and Search --> : ASP.net dropdownlist


ssagar
05-06-2007, 08:21 AM
Hi All,

Pls can you help me?

I have an Dropdownlist in which I am putting data dynamically from the database, but at time of selcting the value it showing the correct value which are Iam selecting but at the time of inserting data in the Database it takes the very firsrt value from the list.

I have tried many ways to overcome this problem but all are worth.

abhi_viking
05-07-2007, 01:39 AM
can you post your code here so that things can get clearer

Ribeyed
05-07-2007, 09:23 AM
you must be populating the DropDownList in your page_load or page_int before you retrieve the selected value. Your seleced value will not be there anymore.
Don't know if this is the best way around it but i would set a variable equal to the selected value, populate your DropDownList then use the variable for your working about to reset the DropDownList.