Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello
I have big problem with dropdownlist which is in bootstrap div. When I clicked button which is in the same div to save in database every time I have default value from dropdownlist. Dropdownlist I filled from database. Someone have ide how it fix?
Posted
Comments
ZurdoDev 14-Mar-15 20:56pm    
You'll have to post the relevant code but it sounds like you are databinding your dropdown again.
Arkadeep De 15-Mar-15 4:43am    
If you are trying to bind the ddl in page load make sure that you put that within IsPostBack. As per my experience this is the basic mistake every one does. so check that once.


if(!IsPostBack()) { /* your code to bind ddl */}

and if its not the problem, then improve the question and provide the code you have done.
sokkkol 15-Mar-15 6:09am    
Thanks , It's WORK :)
Arkadeep De 15-Mar-15 12:33pm    
Good. Now accept the solution and mark this question as [Solved].
Thanks..

1 solution

Check whether you have put the binding of Drop Down List within postback in page load..
use
C#
if(!IsPostBack()) { /* your code to bind ddl */}

to bind the Drop Down List.
 
Share this answer
 

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