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
Mark Rae [MVP] - 30 May 2008 03:40 GMT
> What is the problem
You're trying to use Context with Response.Redirect:
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=15
> and how can I fix it?
1) Use Server.Transfer
2) Use Session
3) Use a QueryString

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net