Passing Info from one page to another

Discussion in 'ASP .Net' started by =?Utf-8?B?SXJmYW4gQWtyYW0=?=, Feb 14, 2005.

  1. Hi People,

    Just wondering how we can pass info from one page to another when we enter
    Response.Redirect("CertainPage.aspx",false), so that we can observe this
    information and display corresponsing info on the screen of the new page.

    Will wait for useful responses.

    Thanks,

    Irfan
    =?Utf-8?B?SXJmYW4gQWtyYW0=?=, Feb 14, 2005
    #1
    1. Advertising

  2. There are a number of ways to pass values from one page to
    another, such as using the querystring, cookies, session,
    context, saving to a temporary table in the database between each page, etc.
    You'll have to decide which technique is best for your application.

    Here are several good articles on the subject to help you decide.
    http://www.dotnetbips.com/displayarticle.aspx?id=79

    http://msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/default.aspx

    http://www.aspalliance.com/kenc/passval.aspx

    Here's a nice, simple way to pass values from one page to another:
    (VB.NET code)

    'Add data to the context object before transferring
    Context.Items("myParameter") = x
    Server.Transfer("WebForm2.aspx")

    Then, in WebForm2.aspx:

    'Grab data from the context property
    Dim x as Integer = CType(Context.Items("myParameter"),Integer)

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


    "Irfan Akram" <> wrote in message
    news:...
    > Hi People,
    >
    > Just wondering how we can pass info from one page to another when we enter
    > Response.Redirect("CertainPage.aspx",false), so that we can observe this
    > information and display corresponsing info on the screen of the new page.
    >
    > Will wait for useful responses.
    >
    > Thanks,
    >
    > Irfan
    Steve C. Orr [MVP, MCSD], Feb 14, 2005
    #2
    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:
    2
    Views:
    12,130
    Hal Rosser
    Feb 24, 2006
  2. loveNUNO
    Replies:
    2
    Views:
    908
    loveNUNO
    Nov 20, 2003
  3. Renie83
    Replies:
    2
    Views:
    233
  4. Robert Cohen
    Replies:
    3
    Views:
    270
    Andrew Durstewitz
    Jul 15, 2003
  5. Edwin
    Replies:
    1
    Views:
    131
    Randy Webb
    Aug 7, 2006
Loading...

Share This Page