selectedindexchanged on two dropdownlists

Sluggo

Newcomer
Joined
Apr 29, 2004
Messages
7
hello all!

i have two drop down lists, one is the two letter country code and the other is the actual name of the country. if the country code is changed, the name of the country in the drop down list must also change. in the same manner of the country is changed, the country code must also change and should reflect the appropriate country code. i know this can be done easily by setting the autopostback property of the two drop down lists and setting the selectedvalue of the country code similar to the code below:

Private Sub DropDownOriginDesc_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownOriginDesc.SelectedIndexChanged
DropDownOrigin.SelectedValue = DropDownOriginDesc.SelectedValue
End Sub

my first question is this, i want to achieve the same result without using autopostback, is this possible?

my second question is, does the autopostback put "additional" load on my server that it might result in performance degradation? because if not i might as well stick to using autopostback instead of figuring out a way around it.


thanks in advance
 
1. I think its possible, with client side script (eg. Javascript or VBScript).
2. Depending on what you meant by additional load. What autopostback does is just use client side script to do post back automatically, instead of having user to click on a button to do the post back manually. The question is, is your site going to have a huge amount of traffic at all time? If yes, then it might be worthwhile spending time writing those script, otherwise, just use autopostback.

Please note, I am fairly new to ASP .Net myself too. So I could be wrong.
 
thanks for the feedback. can you point me to the right direction on creating the scripts you mentioned? thanks
 
Back
Top