using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

/// <summary>
///BasePage 的摘要说明
/// </summary>
public class BasePage : Page
{
    public BasePage()
    {
        //
        //TODO: 在此处添加构造函数逻辑
        //
    }
    public string BookName
    {
        get
        {
            try { return Session["BookName"].ToString(); }
            catch (Exception ex) { return ""; }
        }
    }

    protected override void OnLoad(EventArgs e)
    {
        if (Session["BookName"] == null || Session["BookName"] == "")
        {
            Response.Write("<script language='javascript' defer>alert('由于长时间未操作，请重新登陆');top.location='../Login.aspx';</script>");
        }
        base.OnLoad(e);
    }

    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        ViewStateUserKey = Session.SessionID;
    }
}