protected void Page_Load(object sender, EventArgs e)
{
if (CookieWrapper.Username != null && CookieWrapper.Role == "Member")
{
hlUsername.Text = CookieWrapper.Username;
showProfilePicture();
}
else
Response.Redirect("~/ErrorPages/401.aspx");
}
In this master page Page_Load event i will check whether the cookies values,
if false will redirect to the error page.
So another words, my child pages also will fire this MasterPage Page_Load event right.
But now my problem is occured, some of the child pages did fire this event, but some does not and result in "Object Reference Null"
And ideas?