D
Daniel Groh
Hi,
I've written a C# Server.Transfer from WebForm1.aspx to WebForm2.aspx
In both i'm using the same user control but with different params, for
example;
In the user control:
if(Request.ServerVariables["SCRIPT_NAME"]==Server.MapPath("WebForm1.aspx")){
lblTitle.Text = "Page 1";
}else{
if(Request.ServerVariables["SCRIPT_NAME"]==Server.MapPath("WebForm1.aspx")){
lblTitle.Text = "Page 2";
}
}
I works perfectly, but when i have the Server.Transfer("WebForm2.aspx"); it
keeps the Page 1 title from the WebForm1.aspx.
And if i try to instance my User control in WebForm2.aspx i have this error
in WebForm1.aspx: Error executing child request for WebForm2.aspx.
It changes to Page 2 title only when i use
Response.Redirect("WebForm2.aspx");
What is happening ?
Thanks in advance
I've written a C# Server.Transfer from WebForm1.aspx to WebForm2.aspx
In both i'm using the same user control but with different params, for
example;
In the user control:
if(Request.ServerVariables["SCRIPT_NAME"]==Server.MapPath("WebForm1.aspx")){
lblTitle.Text = "Page 1";
}else{
if(Request.ServerVariables["SCRIPT_NAME"]==Server.MapPath("WebForm1.aspx")){
lblTitle.Text = "Page 2";
}
}
I works perfectly, but when i have the Server.Transfer("WebForm2.aspx"); it
keeps the Page 1 title from the WebForm1.aspx.
And if i try to instance my User control in WebForm2.aspx i have this error
in WebForm1.aspx: Error executing child request for WebForm2.aspx.
It changes to Page 2 title only when i use
Response.Redirect("WebForm2.aspx");
What is happening ?
Thanks in advance