DropDownList Default

How do I get the value displayed in the DropDownList when redirecting through the cancel button. The value on the page where the cancel button is in the TextBox should be caught in the DropDownList.

This DropDownList also has an event SelectedIndexChanged

for which when we select a country in the list we get the ListView displayed on the same page. This ListView has an add button that redirects us to another page called addcountry, which has few controls. In these controls one TextBox I get the value via QueryString in enabled state False

. Now again I need this value displayed in the DropDownList when I click the cancel button.

How can I solve this problem?

+1


source to share


1 answer


Using variables $_POST

and $_GET

Variables, you can get almost any value from the form and place it in the right place on the new page, this right place can be one of the items in the dropdown list ..

To be absolutely sure that your Cancel button will send a good value to the page you want, place it in an independent form where your new page (where you have a dropdown) as its action and in that separate form puts a hidden field. which contains a specific value that you want to see in that dd list ...



I hope I understand, but I'm starting with your very "fuzzy" and vague question. It's hard to help you.

0


source







All Articles