hey
asp.net 2.0
In my web portal I got several webpage and a masterpage (ContentMaster.aspx). The webpages uses this masterpage...
In the Page_Load event of ContentMaster.aspx I want to redirect the user to another webpage if he is an anonymous user
if (Profile.IsAnonymous)
{
Response.Redirect("~/join.aspx");
}
This is causing this error:
An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code
A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code
The program '[5196] WebDev.WebServer.EXE: Managed' has exited with code 0 (0x0).
But if I remove this code from ContentMaster.aspx and place it in the Page_Load event of a webpage. (webpage based on ContentMaster.aspx) then it works....
Why isn't the code working if it's placed within Page_Load of contentmaster.aspx? what should I do to make it works in the Page_Load event of contentMaster.aspx?
Audun