Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to run sql query with callback in asp.net?

i want to load from sql and then after select 'province' dropdownlist filter 'city' dropdownlist ?
Posted
Comments
Orcun Iyigun 2-Jan-13 7:27am    
I think you can run your query from "SelectedIndexChanged" event of your dropdownlist if I understand your question properly. Are you trying to accomplish a cascading dropdown?

In the context of ASP.Net the question you have posted is a very basic question because as a web developer using ASP.Net to create dynamic applications, this type of functionality is the first to be aware of. You may search "DataBinding in ASP.Net using C#" on google to get a start. I would also suggest to get a good book on ASP.Net and start as soon as possible. Start writing some code and the moment you are stuck with something in your code we all are here to solve it. But, to expect that we willl spoon feed you with solutions is a waste of time. I am sorry if I have said something objectionable.
 
Share this answer
 
when use SelectedIndexChanged is postback run!
 
Share this answer
 
Not the callback is the keyword you are looking for, you need Cascading Dropdown.
Look here: http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/CascadingDropDown/CascadingDropDown.aspx[^]
 
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