Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I have two drop down lists on my asp.net page, the second of which needs to be filled in based on the selection in the first dropdownlist. It's work fine when I set Autopostback="true". The catch
however, is that it must occur without a postback/pageload.

Does anyone have a way to accomplish this? I have found many solution by googling, but I don't understand them. I am not very good at asp.net. Please give me the simple code if you have.

Thanks in advance, your help is greatly appreciated.

Sazzad
Posted
Updated 4-Dec-13 5:10am
v2

Add ajax update panel in your page and put drop down list controls in it..

use this link as reference.

http://www.c-sharpcorner.com/Forums/Thread/199983/cascading-dropdownlist-using-updatepanel.aspx[^]
 
Share this answer
 
You may use Update Panels to acheive this or use JQuery. Jquery will completely avoid postback action by making a javascript call to the server when update panel will postback only what is inside of the update panel and will avoid a complete postback (and also the pageload).

However if your goal is to avoid some actions in your pageload event I would suggest you to use IsPostback property wich will be set to true when the server call comes from a postback.
 
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