dropdownlist problem
-
i have used the dropdownlist with data from database Whenever i run my application it always shows the first item of the dropdownlist as my selected item.How can avoid this Plz hel me?
Bind DropDownlist inside
!Page.IsPostBack
if(!PageIsPostBack) { //bind here dropdownlist }
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
-
i have used the dropdownlist with data from database Whenever i run my application it always shows the first item of the dropdownlist as my selected item.How can avoid this Plz hel me?
your question makes absolutely no sense. 'every time you run the application' ? If you mean every time you do a postback, then the other answer you got is correct. If you mean what you said, what did you expect it to show ? If you want to show something else, then you need to set the selected index. Perhaps if you explain yourself better.
Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.