Passing Data Around in ASP.NET

Discussion in 'ASP .Net' started by Glenn, Jan 19, 2004.

  1. Glenn

    Glenn Guest

    I am an old ASP developer that has begun porting existing apps to ASP.NET.

    I am currently working on a wizard dialog that contains about 4 pages. In
    ASP in order to keep track of user entered data on the various wizard pages
    I had to manually create hidden form fields and pass these between pages.
    The form action either went to the next or previous page in the dialog,
    depending on whether NEXT or BACK button was pressed. All validation was
    done in client side script.

    Should I emply the same techniques in ASP.NET, or is there a more efficient
    way.

    My initial thoughts were to write a custom class capable of storing the
    wizard dialog info and instantiate it as session var. Whenever a dialog
    button is clicked I will update this structure via a postback server event,
    and then move onto the next/prev page using the Response.Redirect or
    Response.Transfer.

    Am I on the right track?

    Thanks,

    G.
    Glenn, Jan 19, 2004
    #1
    1. Advertising

  2. Glenn wrote:
    > I am an old ASP developer that has begun porting existing apps to ASP.NET.
    >
    > I am currently working on a wizard dialog that contains about 4 pages. In
    > ASP in order to keep track of user entered data on the various wizard pages
    > I had to manually create hidden form fields and pass these between pages.
    > The form action either went to the next or previous page in the dialog,
    > depending on whether NEXT or BACK button was pressed. All validation was
    > done in client side script.
    >
    > Should I emply the same techniques in ASP.NET, or is there a more efficient
    > way.
    >
    > My initial thoughts were to write a custom class capable of storing the
    > wizard dialog info and instantiate it as session var. Whenever a dialog
    > button is clicked I will update this structure via a postback server event,
    > and then move onto the next/prev page using the Response.Redirect or
    > Response.Transfer.
    >
    > Am I on the right track?
    >
    > Thanks,
    >
    > G.
    >
    >


    Sounds like a good initial approach, a little more OO than your previous
    ASP approach so a little cleaner. Another way I always try to see if it
    will work initially, is to use one page with multiple panels, as panels
    seem intuitively to lend themselves to this app beautifully (turn one
    panel on, then after they enter, turn on the next, etc.). The only
    problem is the size of ViewState. If the panels are complex or contain
    a number of fields, the ViewState can get to be too much. But you could
    also play with selectively enabling ViewState.

    Then you don't have to pass anything from page to page....

    So if this wouldn't cause ViewState problems, I'd look at using Panels.
    Otherwise your approach seems to be just fine...

    --
    Craig Deelsnyder
    Microsoft MVP - ASP/ASP.NET
    Craig Deelsnyder, Jan 19, 2004
    #2
    1. Advertising

  3. Glenn

    MSFT Guest

    Hi Glenn,

    Thank you for using MSDN Newsgroup. I am Luke and I am review this issue
    currently. As I understand, your ASP.NET application is like Wizard which
    need to keed data between pages. I think your initial thought about session
    is the most common way can use. Besides this, we also can use Application
    variant, Viewstate, cookies and hidden fields. If the data shared between
    pages are not large, session varaint should be the most easiest way to
    achieve.


    Luke
    Microsoft Online Support

    Get Secure! www.microsoft.com/security
    (This posting is provided "AS IS", with no warranties, and confers no
    rights.)
    MSFT, Jan 19, 2004
    #3
    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. blue

    Passing around open readers

    blue, Jan 23, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    439
    Sharon
    Mar 6, 2004
  2. Bonzo
    Replies:
    1
    Views:
    415
    Cy Edmunds
    Jul 23, 2003
  3. =?ISO-8859-1?Q?S=F6ren?=

    passing around iostreams

    =?ISO-8859-1?Q?S=F6ren?=, Jul 26, 2003, in forum: C++
    Replies:
    3
    Views:
    419
    =?ISO-8859-1?Q?S=F6ren?=
    Jul 27, 2003
  4. Piet
    Replies:
    0
    Views:
    527
  5. Network/Software Buyer
    Replies:
    0
    Views:
    414
    Network/Software Buyer
    May 23, 2010
Loading...

Share This Page