if (Session["Admin"]== null)
{
Response.Redirect("controlpanel.aspx?Msg=illegal");
}
----- Original Message -----
From: Arindam
To: [email protected]
Sent: Saturday, January 08, 2005 3:05 PM
Subject: [AspNetAnyQuestionIsOk] System.NullReferenceException error
Hello Friend
In Page_Load i have written
if (Session["Admin"].ToString()=="")
{
Response.Redirect("controlpanel.aspx?Msg=illegal");
}
when Session["Admin"] expired its not getting redirected to the specified url
,
i am getting the following error..why ? How should i write ?
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to
an instance of an object.
Thanks
Arindam
Thanks & Regards
Arindam
Web Designer & Developer
Yahoo! India Matrimony: Find your life partneronline.
[Non-text portions of this message have been removed]
------------------------------------------------------------------------------
Yahoo! Groups Links
a.. To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
b.. To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/