Problem passing data between pages

Discussion in 'ASP .Net' started by John, May 30, 2008.

  1. John

    John Guest

    Hi

    From the calling page I am assigning value a string to context as below;

    Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As
    System.EventArgs) Handles btnSubmit.Click
    Dim Msg As String

    Context.Items("Msg") = Msg
    Response.Redirect("Called_Page.aspx")
    End Sub

    In the called page I have the below code to pick the info from context but
    no information is received;

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
    Handles Me.Load
    lblMsg.Text = CType(Context.Items("Msg"), String)
    End Sub

    What is the problem and how can I fix it?

    Thanks

    Regards
     
    John, May 30, 2008
    #1
    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. Aidan Gill

    Passing Details between pages

    Aidan Gill, Jul 10, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    439
    Natty Gur
    Jul 10, 2003
  2. cgia
    Replies:
    5
    Views:
    975
    Steve C. Orr, MCSD
    Jul 26, 2003
  3. Matt M
    Replies:
    1
    Views:
    1,275
    Matt M
    Aug 28, 2003
  4. Smokey Grindle

    Passing data between pages?

    Smokey Grindle, Jun 23, 2006, in forum: ASP .Net
    Replies:
    7
    Views:
    904
    Scott M.
    Jun 23, 2006
  5. roo
    Replies:
    2
    Views:
    455
  6. dbuchanan

    Passing data between pages

    dbuchanan, Jun 25, 2008, in forum: ASP .Net
    Replies:
    3
    Views:
    528
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Jun 25, 2008
  7. RadioSignal

    passing variables from .aspx.cs code pages to .aspx pages

    RadioSignal, Sep 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    7
    Views:
    3,079
    Mirronelli
    Oct 22, 2005
  8. Deepiceman

    passing data between 2 pages

    Deepiceman, Jun 23, 2004, in forum: ASP General
    Replies:
    1
    Views:
    218
    Bullschmidt
    Jun 24, 2004
Loading...