How to keep session variable on combo box for "Country"

M

Mark B

I have a aspx form with a combobox drop-down to select 1 country from over
120 countries.

On the next web page after that, I also have the same combobox so that the
user can make a final confirmation of the data entered and also add some
other info.

I carry through Session("Country") from the first page.

How can I make sure that the combo on the second page has the same country
selected?

TIA
Mark

P.S. I also have 4 other such combos for Industry, State etc.
 
V

Vani Donthula

Mark ,
Is that you want to show the country in combo box what they selected in
page1.aspx,
Clarify Your question..
 
K

Kaushik Pushpavanam [MSFT]

In page1.aspx you would have a form like
<form action="page2.aspx" method="post">
<b>What is the priority of this issue?</b><br>
<Select name="Priority" class="Normal2" id="priority_id"><br>
<OPTION value="P1" selected="">Priority 1 - Critical Business
Outage</OPTION>
<OPTION value="P2" selected="">Priority 2 - Major
Problem</OPTION>
<OPTION value="P3" selected="">Priority 3 - Minor
Problem</OPTION>
<OPTION value="P4" selected="">Priority 4 - Not even
that</OPTION>
</SELECT>
<input type="submit" name="submit" value="Report this Bug"><br>


In page2.aspx
You can access this value from Request.Form("Priority")

It's better not to put such info into a Session variable as that hogs memory
unncessarily. In many cases, you have to wait till Session Timeout for thyis
memory to be freed.
This also allows page1.aspx and page2.aspx to be on different servers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top