Sign in to follow this  
Tiger99

Dynamic update

Recommended Posts

Hi I am just wondering how can I use ASP to update the values in a dropdown list as user change the values of the other dropdown list? Can this be done in ASP or this can only be done in javascript? Thanks

Share this post


Link to post
Share on other sites
I believe this is a programming issue and I believe I have posted my question under the appropriate category - General Programming: The place for discussing programming issues not related to games...

Share this post


Link to post
Share on other sites
Quote:
Original post by Tiger99
sorry, can you please explain what post back means. An sample example code would be very helpful

Thanks for your help


It means when you change the first drop down the page causes an event which will reload the page, call to 'Page_Load'. You need to make the drop post back, in the properties window in VS.NET if u use that.

The drop down will have something like a 'SelectedIndex_Changed' event. Put your code to update the other drop down in that, make sure in your Page_Load you do the first initializations in a block like this

if (!IsPostBack)
{
// do
}


btw what are u using, is this ASP.NET with VB.net /C# or just asp


Hope that helped

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this