Response.Redirect(...) & setting target
-
Does anybody know if it is possible to set a target=_top parameter for a code behind Response.Redirect(..) That probably doesnt make much sense, so let me explain. A have a frameset (index.htm) that frames up two pages (navpage.aspx & main.aspx) when main.aspx is loaded or postsback in the Page_Load event it checks if a session variable is set if it isnt then I need to redirect to logon.aspx. At the moment I am doing this with the following code
sObject = (SessionObject)Session["object"];
if (sObject == null)
{
Response.Redirect("logon.aspx", true);
}Now this works but the problem is that the redirection only occurs within the frameset so navpage.aspx is still displayed at the left of the page. What I need to do is display logon.aspx as _top. post.mode = postmodes.signature; SELECT everything FROM everywhere WHERE something = something_else; > 1 Row Returned > 42
-
Does anybody know if it is possible to set a target=_top parameter for a code behind Response.Redirect(..) That probably doesnt make much sense, so let me explain. A have a frameset (index.htm) that frames up two pages (navpage.aspx & main.aspx) when main.aspx is loaded or postsback in the Page_Load event it checks if a session variable is set if it isnt then I need to redirect to logon.aspx. At the moment I am doing this with the following code
sObject = (SessionObject)Session["object"];
if (sObject == null)
{
Response.Redirect("logon.aspx", true);
}Now this works but the problem is that the redirection only occurs within the frameset so navpage.aspx is still displayed at the left of the page. What I need to do is display logon.aspx as _top. post.mode = postmodes.signature; SELECT everything FROM everywhere WHERE something = something_else; > 1 Row Returned > 42
You can do a hack as follows. Write a javascript that redirects as _top and from your page do like this:
if (sObject == null)
{
Response.Clear ();
Response.Write (myjavascript);
Response.End ();
}Regards, Alexandru Savescu