By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,983 Members | 1,597 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,983 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.
Feb 3 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Mark ,
Is that you want to show the country in combo box what they selected in
page1.aspx,
Clarify Your question..

"Mark B" <mb*******@Delete-All-X-XorbisofXXt.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
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.

Feb 3 '06 #2

P: n/a
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.

--
Kaushik Pushpavanam [MSFT]
Monad Test
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.

"Mark B" <mb*******@Delete-All-X-XorbisofXXt.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
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.

Feb 3 '06 #3

P: n/a
Yes

"Vani Donthula" <va***********@cycustech.com> wrote in message
news:eO*************@TK2MSFTNGP11.phx.gbl...
Mark ,
Is that you want to show the country in combo box what they selected in
page1.aspx,
Clarify Your question..

"Mark B" <mb*******@Delete-All-X-XorbisofXXt.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
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.


Feb 4 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.