Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How to keep session variable on combo box for "Country"

Reply
Thread Tools

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

 
 
Mark B
Guest
Posts: n/a
 
      02-03-2006
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.


 
Reply With Quote
 
 
 
 
Vani Donthula
Guest
Posts: n/a
 
      02-03-2006
Mark ,
Is that you want to show the country in combo box what they selected in
page1.aspx,
Clarify Your question..

"Mark B" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>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.
>
>



 
Reply With Quote
 
 
 
 
Kaushik Pushpavanam [MSFT]
Guest
Posts: n/a
 
      02-03-2006
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>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.
>
>



 
Reply With Quote
 
Mark B
Guest
Posts: n/a
 
      02-04-2006
Yes

"Vani Donthula" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Mark ,
> Is that you want to show the country in combo box what they selected in
> page1.aspx,
> Clarify Your question..
>
> "Mark B" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> >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.
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to reference one combo box from another combo box SM Javascript 2 04-28-2007 04:49 PM
Fill Combo Box based on another Combo Box dthmtlgod ASP General 1 11-16-2005 04:08 PM
COMBO BOX INSTEAD OF DROP DOWN BOX =?Utf-8?B?QW5nZWw=?= ASP .Net 3 06-29-2004 06:38 PM
Populate List Box base on Combo Box Selection Adrian ASP General 1 02-18-2004 09:49 AM
Combo Box and text box Mike Javascript 2 09-24-2003 07:40 PM



Advertisments