Question:
binding dropdown list in asp.net?
alka p
2010-09-09 05:20:16 UTC
there are 2 dropdownlist, when i select from first dropdown the related values should be displayed in the second dropdown.but i couldn't understand where should I place my code for binding as when i use the selected indexchange of first dropdown ,code is not fired of data binding, so I use a buttonclick for that but after clicking the button the data binds in the 2nd dropdown but all other values in the page gets blank, so plzz tell me how to do this
Three answers:
nkm
2010-09-09 21:20:54 UTC
use the selected index event of first dropdownlist1 for binding the second dropdownlist2 and also set the AutoPostBack property of first dropdownlist1 to True(AutoPostBack=True) in the property window of DropDownList1. and about the other values in the page blank if you used Page_load event for display other value then it should be write in the If Page.IsPostBack=false then block in the page load events i hope it will work if not then plz show me the code which r used.
2010-09-09 10:11:41 UTC
When first dropdown is populated, call the first drop down selected index change event and from there take the value from first dropdown and populate the second dropdown.

This works.



or show the code I ll try to correct.
2016-10-05 11:45:22 UTC
sure, bypass to the administration panel, then to the internet techniques tab/icon. Double click on it, you're able to ought to alter to classical view to come across it. Then sparkling historical past, cookies, and non everlasting cyber web data. rather damn common easily.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...