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. Advertisements

  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. Advertisements

  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. Advertisements

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. Jason
    Replies:
    1
    Views:
    814
  2. Dennis Gavrilov
    Replies:
    1
    Views:
    1,629
    Dennis Gavrilov
    Jul 24, 2003
  3. =?Utf-8?B?QXNoYSBHaWxs?=

    Sharing variables between pages...

    =?Utf-8?B?QXNoYSBHaWxs?=, Jun 9, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    2,048
    Pete Wright
    Jun 9, 2004
  4. axis
    Replies:
    2
    Views:
    575
    Jonathan Allen
    Sep 25, 2004
  5. Guest
    Replies:
    1
    Views:
    1,026
    Kevin Spencer
    May 19, 2005
  6. Sasi
    Replies:
    0
    Views:
    625
  7. Gary N
    Replies:
    1
    Views:
    873
    Herman Timmermans
    Jan 3, 2004
  8. John Devlon

    Sharing session variables between pages

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