DB Query in AJAX
-
Hi Friends, i have two dropdowns- one to fill Country Names from Country table and the other one fills the State Names from State table CountryId is foreign key in State table When i select the Country name from country dropdown i want to fill States of that country in state dropdown. this is my query "select State_Id,State_name from State where country_id ='" & ddlCountry.selectedValue & "'" How to do this in AJAX in ASP.Net application can you send sample code thanks in advance
-
Hi Friends, i have two dropdowns- one to fill Country Names from Country table and the other one fills the State Names from State table CountryId is foreign key in State table When i select the Country name from country dropdown i want to fill States of that country in state dropdown. this is my query "select State_Id,State_name from State where country_id ='" & ddlCountry.selectedValue & "'" How to do this in AJAX in ASP.Net application can you send sample code thanks in advance
I assume you are using AJAX toolkit. If so put your dropdowns inside update panel.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
I assume you are using AJAX toolkit. If so put your dropdowns inside update panel.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
thanks Navaneeth we need to give Autopostback is true in AJAX also?? because i have given the below code but SelectedIndexChanged Event of the ddlCountry is not Triggering This is my html code <asp:UpdatePanel ID="UpdatePanel1" runat="server"> </asp:UpdatePanel> <asp:DropDownList ID="ddlCountry" runat="server" > </asp:DropDownList> <asp:DropDownList ID="ddlState" runat="server"> </asp:DropDownList> I tried to give dropdowns inside UpdatePanel but its showing error like "Type 'System.Web.UI.UpdatePanel' does not have a public property named 'DropDownList'"
-
Hi Friends, i have two dropdowns- one to fill Country Names from Country table and the other one fills the State Names from State table CountryId is foreign key in State table When i select the Country name from country dropdown i want to fill States of that country in state dropdown. this is my query "select State_Id,State_name from State where country_id ='" & ddlCountry.selectedValue & "'" How to do this in AJAX in ASP.Net application can you send sample code thanks in advance
Hi, put your both Dropdown in Update Panel and Set Autopost back property true for first Dropdown. Hopen it will help you.
Thanks, Sun Rays To get something you must have to try once. My Articles
-
Hi, put your both Dropdown in Update Panel and Set Autopost back property true for first Dropdown. Hopen it will help you.
Thanks, Sun Rays To get something you must have to try once. My Articles
-
Hi, what error you are getting. Plz describe so can help you properly.. :)
Thanks, Sun Rays To get something you must have to try once. My Articles
-
Hi, what error you are getting. Plz describe so can help you properly.. :)
Thanks, Sun Rays To get something you must have to try once. My Articles
This is my html code <asp:UpdatePanel ID="UpdatePanel1" runat="server"> </asp:UpdatePanel> <asp:DropDownList ID="ddlCountry" runat="server" > </asp:DropDownList> <asp:DropDownList ID="ddlState" runat="server"> </asp:DropDownList> when i give dropdowns inside UpdatePanel its showing error like "Type 'System.Web.UI.UpdatePanel' does not have a public property named 'DropDownList'"
-
Hi Friends, i have two dropdowns- one to fill Country Names from Country table and the other one fills the State Names from State table CountryId is foreign key in State table When i select the Country name from country dropdown i want to fill States of that country in state dropdown. this is my query "select State_Id,State_name from State where country_id ='" & ddlCountry.selectedValue & "'" How to do this in AJAX in ASP.Net application can you send sample code thanks in advance
Check this out: http://www.interspire.com/content/articles/33/3/3-Practical-Uses-For-AJAX[^]
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson -
Check this out: http://www.interspire.com/content/articles/33/3/3-Practical-Uses-For-AJAX[^]
Vasudevan Deepak Kumar Personal Homepage
Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson