Click here to Skip to main content
15,748,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have one form containing dropdownlist with 4 values in it fetching from database and have one button.
now on page load i have written coding for fetching data in dropdownlist and i am getting that and i select one value from it but when i click on button for "additional functionality" on it then dropdownlist also get refreshed(the value i selected is replaced by first value in dropdownlist...i tried of autopostback on button and too on dropdownlist but had no affect
.how can i stop this
pls tell

1 solution


I guess you are loading your dropdown in all the pageloads, irrespective of whether its a post back or not.
You can load your dropdown only if its a initial page load and not a post back.

//then your code here

Hope this helps.
Share this answer
shivani 2013 7-Feb-13 7:42am    
thanks.i have one more issue that i want when i click on particular item of i want its product cost should come in a given textbox .i am not able to achieve through ddlprd_selectedindexchange but same i can achieve on clicking button...y so can i achieve through ddlprd_selectedindexchange ?
pls tell
manognya kota 7-Feb-13 9:12am    
Once you fix this problem, you should be able to get the selected item in your index change.Can you post your code for the button click and the selected index change?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900