Sorry everybody first a great god, and not much, also please burke,
The problem is such,
Public class memgPage: System. Web. UI. Page
{
Public memgPage ()
{
Enclosing the Load +=new EventHandler (memgPage_Load);
}
Protected void memgPage_Load (object sender, EventArgs e)
{
if (! IsLogin ())
{
Response. Write (" & lt; Script> The parent. The location. Href='https://bbs.csdn.net/topics/login.aspx' & lt;/script>" );
The Response. The End ();
}
}
Private bool IsLogin ()
{
If (Session [" user "]!=null)
{
return true;
}
return false;
}
}
I inherited this class a page
Child pages
Public partial class User_Edit: memgPage
{
//here to handle the login timeout, but the program execution to the upper jump, how to deal with here?
}
Thank you for the
CodePudding user response:
Rewrite the parent class, and asp.net has nothing to do, it's just the basic c # syntax, you need to be familiar with c # inheritance,
Understand the override
Public override ActionResult Index ()
{
}
CodePudding user response: