Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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 2-Jan-13 1:21am
Comments
Orcun Iyigun at 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?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

when use SelectedIndexChanged is postback run!
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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[^]
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 382
1 Damith Weerasinghe 370
2 thatraja 350
3 Sergey Alexandrovich Kryukov 259
4 Ajith K Gatty 200
0 Sergey Alexandrovich Kryukov 10,639
1 OriginalGriff 6,658
2 Peter Leow 4,735
3 Abhinav S 3,813
4 Maciej Los 3,565


Advertise | Privacy | Mobile
Web03 | 2.8.140421.2 | Last Updated 2 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid