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

Discussion in 'ASP .Net' started by Mark B, Feb 3, 2006.

  1. Mark B

    Mark B Guest

    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.
     
    Mark B, Feb 3, 2006
    #1
    1. Advertising

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

    "Mark B" <> wrote in message
    news:%...
    >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.
    >
    >
     
    Vani Donthula, Feb 3, 2006
    #2
    1. Advertising

  3. 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" <> wrote in message
    news:%...
    >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.
    >
    >
     
    Kaushik Pushpavanam [MSFT], Feb 3, 2006
    #3
  4. Mark B

    Mark B Guest

    Yes

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

    >
    >
     
    Mark B, Feb 4, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. S.Guhananth
    Replies:
    1
    Views:
    572
    Alvin Bruney [Microsoft MVP]
    Apr 30, 2005
  2. Zyron
    Replies:
    2
    Views:
    1,536
    Jukka K. Korpela
    Nov 8, 2005
  3. anbaesivam
    Replies:
    3
    Views:
    981
    Allen Chen [MSFT]
    Apr 2, 2009
  4. dthmtlgod

    Fill Combo Box based on another Combo Box

    dthmtlgod, Nov 16, 2005, in forum: ASP General
    Replies:
    1
    Views:
    622
    Bob Barrows [MVP]
    Nov 16, 2005
  5. SM
    Replies:
    2
    Views:
    401
Loading...

Share This Page