Problem passing data between pages

J

John

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top