sharing control data between pages

Discussion in 'ASP .Net' started by Carlos, Oct 17, 2007.

  1. Carlos

    Carlos Guest

    Hi all,

    what is the best way to share the data of lets say a textbox text between
    pages?
    for example if I fill the textbox in one page and later redirect to a new
    page, and
    I would like to have that information there as well (VB). Thanks in advance.

    Carlos.
     
    Carlos, Oct 17, 2007
    #1
    1. Advertising

  2. Session variable will do in all cases.

    --
    Eliyahu Goldin,
    Software Developer
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin
    http://usableasp.net


    "Carlos" <> wrote in message
    news:...
    > Hi all,
    >
    > what is the best way to share the data of lets say a textbox text between
    > pages?
    > for example if I fill the textbox in one page and later redirect to a new
    > page, and
    > I would like to have that information there as well (VB). Thanks in
    > advance.
    >
    > Carlos.
    >
     
    Eliyahu Goldin, Oct 17, 2007
    #2
    1. Advertising

  3. Carlos

    TarTar Guest

    Hello Carlos,

    My personal favourite for passing information between pages is
    HttpServerUtility.Transfer().
    http://msdn2.microsoft.com/en-us/library/y4k58xk7(VS.80).aspx
    "Transfer method preserves the QueryString and Form collections." It means
    you can access previous page's view state.

    If you use ASP.NET 2.0, google for "Cross-Page Postings" and the PostBackUrl
    property.

    Cheers,
    Leszek "TarTar"

    "Carlos" <> wrote in message
    news:...
    > Hi all,
    >
    > what is the best way to share the data of lets say a textbox text between
    > pages?
    > for example if I fill the textbox in one page and later redirect to a new
    > page, and
    > I would like to have that information there as well (VB). Thanks in
    > advance.
    >
    > Carlos.
    >
     
    TarTar, Oct 17, 2007
    #3
  4. You could use Server.Transfer instead of Response.Redirect.
    Then you could use Context to access the PreviousPage (and it's controls)
    directly.
    Here's more info:
    http://SteveOrr.net/articles/PassData.aspx
    http://SteveOrr.net/faq/TransferRedirect.aspx

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


    "Carlos" <> wrote in message
    news:...
    > Hi all,
    >
    > what is the best way to share the data of lets say a textbox text between
    > pages?
    > for example if I fill the textbox in one page and later redirect to a new
    > page, and
    > I would like to have that information there as well (VB). Thanks in
    > advance.
    >
    > Carlos.
    >
     
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider], Oct 17, 2007
    #4
  5. Carlos

    Carlos Guest

    That's great Steve. Thank you very much.

    Carlos.

    "Steve C. Orr [MCSD, MVP, CSM, ASP Insider]" <> wrote in
    message news:...
    > You could use Server.Transfer instead of Response.Redirect.
    > Then you could use Context to access the PreviousPage (and it's controls)
    > directly.
    > Here's more info:
    > http://SteveOrr.net/articles/PassData.aspx
    > http://SteveOrr.net/faq/TransferRedirect.aspx
    >
    > --
    > I hope this helps,
    > Steve C. Orr,
    > MCSD, MVP, CSM, ASPInsider
    > http://SteveOrr.net
    >
    >
    > "Carlos" <> wrote in message
    > news:...
    >> Hi all,
    >>
    >> what is the best way to share the data of lets say a textbox text between
    >> pages?
    >> for example if I fill the textbox in one page and later redirect to a new
    >> page, and
    >> I would like to have that information there as well (VB). Thanks in
    >> advance.
    >>
    >> Carlos.
    >>

    >
     
    Carlos, Oct 19, 2007
    #5
  6. Carlos

    Carlos Guest

    Thanks Eli

    "Eliyahu Goldin" <> wrote in
    message news:u$...
    > Session variable will do in all cases.
    >
    > --
    > Eliyahu Goldin,
    > Software Developer
    > Microsoft MVP [ASP.NET]
    > http://msmvps.com/blogs/egoldin
    > http://usableasp.net
    >
    >
    > "Carlos" <> wrote in message
    > news:...
    >> Hi all,
    >>
    >> what is the best way to share the data of lets say a textbox text between
    >> pages?
    >> for example if I fill the textbox in one page and later redirect to a new
    >> page, and
    >> I would like to have that information there as well (VB). Thanks in
    >> advance.
    >>
    >> Carlos.
    >>

    >
    >
     
    Carlos, Oct 19, 2007
    #6
    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. Justin Gengo

    Re: Sharing information between pages

    S. Justin Gengo, Aug 18, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    365
    S. Justin Gengo
    Aug 18, 2003
  2. =?Utf-8?B?QXNoYSBHaWxs?=

    Sharing variables between pages...

    =?Utf-8?B?QXNoYSBHaWxs?=, Jun 9, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,905
    Pete Wright
    Jun 9, 2004
  3. Guest
    Replies:
    1
    Views:
    875
    Kevin Spencer
    May 19, 2005
  4. Sasi
    Replies:
    0
    Views:
    484
  5. John Devlon

    Sharing session variables between pages

    John Devlon, Jun 29, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    575
Loading...

Share This Page