Saving state after moving to another page.

Discussion in 'ASP .Net' started by =?Utf-8?B?cm11bnNvbjg=?=, Mar 7, 2005.

  1. What is the recommended approach for the following scenario?

    I have a page that has a button that when clicked transfers to a new page
    where the user selects an item from a list. Once that item is selected, I'd
    like to transfer back to the original page, BUT I need that page with the
    same state when the user clicked the button.

    I am using ASP.Net 2.0
     
    =?Utf-8?B?cm11bnNvbjg=?=, Mar 7, 2005
    #1
    1. Advertising

  2. One of the simplest solutions is to have one page that acts like two, by
    having two different panels in it. You'll only show one panel at a time.
    That way everything can be kept in viewstate the whole time.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net



    "rmunson8" <> wrote in message
    news:...
    > What is the recommended approach for the following scenario?
    >
    > I have a page that has a button that when clicked transfers to a new page
    > where the user selects an item from a list. Once that item is selected,
    > I'd
    > like to transfer back to the original page, BUT I need that page with the
    > same state when the user clicked the button.
    >
    > I am using ASP.Net 2.0
     
    Steve C. Orr [MVP, MCSD], Mar 7, 2005
    #2
    1. Advertising

  3. Here's further reading on the subject for you:
    http://SteveOrr.net/faq/SaveState.aspx

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "Steve C. Orr [MVP, MCSD]" <> wrote in message
    news:...
    > One of the simplest solutions is to have one page that acts like two, by
    > having two different panels in it. You'll only show one panel at a time.
    > That way everything can be kept in viewstate the whole time.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    >
    > "rmunson8" <> wrote in message
    > news:...
    >> What is the recommended approach for the following scenario?
    >>
    >> I have a page that has a button that when clicked transfers to a new page
    >> where the user selects an item from a list. Once that item is selected,
    >> I'd
    >> like to transfer back to the original page, BUT I need that page with the
    >> same state when the user clicked the button.
    >>
    >> I am using ASP.Net 2.0

    >
    >
     
    Steve C. Orr [MVP, MCSD], Mar 7, 2005
    #3
  4. Thanks Steve, that would definitely work, but seems like a less than ideal or
    a "non-standard" approach for a seemingly very common scenario. Is that how
    most handle it?

    "Steve C. Orr [MVP, MCSD]" wrote:

    > One of the simplest solutions is to have one page that acts like two, by
    > having two different panels in it. You'll only show one panel at a time.
    > That way everything can be kept in viewstate the whole time.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    >
    > "rmunson8" <> wrote in message
    > news:...
    > > What is the recommended approach for the following scenario?
    > >
    > > I have a page that has a button that when clicked transfers to a new page
    > > where the user selects an item from a list. Once that item is selected,
    > > I'd
    > > like to transfer back to the original page, BUT I need that page with the
    > > same state when the user clicked the button.
    > >
    > > I am using ASP.Net 2.0

    >
    >
    >
     
    =?Utf-8?B?cm11bnNvbjg=?=, Mar 7, 2005
    #4
  5. Actually, for a simple scenario such as you describe it is a very common
    solution.
    It's not the most efficient possible solution, but it is the simplest and
    most maintainable.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "rmunson8" <> wrote in message
    news:...
    > Thanks Steve, that would definitely work, but seems like a less than ideal
    > or
    > a "non-standard" approach for a seemingly very common scenario. Is that
    > how
    > most handle it?
    >
    > "Steve C. Orr [MVP, MCSD]" wrote:
    >
    >> One of the simplest solutions is to have one page that acts like two, by
    >> having two different panels in it. You'll only show one panel at a time.
    >> That way everything can be kept in viewstate the whole time.
    >>
    >> --
    >> I hope this helps,
    >> Steve C. Orr, MCSD, MVP
    >> http://SteveOrr.net
    >>
    >>
    >>
    >> "rmunson8" <> wrote in message
    >> news:...
    >> > What is the recommended approach for the following scenario?
    >> >
    >> > I have a page that has a button that when clicked transfers to a new
    >> > page
    >> > where the user selects an item from a list. Once that item is
    >> > selected,
    >> > I'd
    >> > like to transfer back to the original page, BUT I need that page with
    >> > the
    >> > same state when the user clicked the button.
    >> >
    >> > I am using ASP.Net 2.0

    >>
    >>
    >>
     
    Steve C. Orr [MVP, MCSD], Mar 7, 2005
    #5
    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. Replies:
    1
    Views:
    335
    Steve C. Orr [MVP, MCSD]
    Jan 12, 2004
  2. linkswanted
    Replies:
    0
    Views:
    945
    linkswanted
    Dec 21, 2007
  3. linkswanted
    Replies:
    0
    Views:
    1,574
    linkswanted
    Jan 6, 2008
  4. linkswanted
    Replies:
    0
    Views:
    451
    linkswanted
    Jan 23, 2008
  5. linkswanted
    Replies:
    0
    Views:
    636
    linkswanted
    Jan 24, 2008
Loading...

Share This Page