How do I post data from aspx page to another aspx page.

Discussion in 'ASP .Net' started by Sriram Mallajyosula, Nov 5, 2003.

  1.  
    Sriram Mallajyosula, Nov 5, 2003
    #1
    1. Advertising

  2. 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)

    Of course 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://msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/default.aspx

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

    http://www.dotnetjunkies.com/tutorials.aspx?tutorialid=600

    http://www.dotnetbips.com/displayarticle.aspx?id=79

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net
    Hire top-notch developers at http://www.able-consulting.com
     
    Steve C. Orr [MVP, MCSD], Nov 5, 2003
    #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. Srinivasa Raghavan Sethuraman

    Post Data ASP web page from ASPX Page

    Srinivasa Raghavan Sethuraman, Jul 20, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    614
    John Saunders
    Jul 20, 2004
  2. =?Utf-8?B?Uk1M?=
    Replies:
    1
    Views:
    574
    =?Utf-8?B?QW5keSBMdWtzaWM=?=
    Sep 16, 2005
  3. =?Utf-8?B?TU9VU1RBRkEgQVJBRkE=?=

    POST data from aspx page to asp page

    =?Utf-8?B?TU9VU1RBRkEgQVJBRkE=?=, Oct 4, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    1,494
    =?Utf-8?B?TU9VU1RBRkEgQVJBRkE=?=
    Oct 6, 2006
  4. luu duong
    Replies:
    2
    Views:
    354
    luu duong
    Oct 8, 2003
  5. Mark

    ASPX Post to another page

    Mark, Oct 12, 2005, in forum: ASP General
    Replies:
    1
    Views:
    262
    Bob Barrows [MVP]
    Oct 12, 2005
Loading...

Share This Page