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. 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. Smokey Grindle

    Passing data between pages?

    Smokey Grindle, Jun 23, 2006, in forum: ASP .Net
    Replies:
    7
    Views:
    760
    Scott M.
    Jun 23, 2006
  2. roo
    Replies:
    2
    Views:
    370
  3. dbuchanan

    Passing data between pages

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

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

    RadioSignal, Sep 12, 2005, in forum: ASP .Net Web Controls
    Replies:
    7
    Views:
    2,337
    Mirronelli
    Oct 22, 2005
  5. Deepiceman

    passing data between 2 pages

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

Share This Page