我的方法在站点里,验证在类里面.virtual override 问题
类:CDQYClassLibrary chkUser.cs中
public static void chkUserLogin()
{
if (Convert.ToString(System.Web.HttpContext.Current.Session[ "User_id "]) == " " || System.Web.HttpContext.Current.Session[ "User_id "] == null || System.Web.HttpContext.Current.Session[ "User_name "] == null)
{
JScript.CheckSession( "User_name ", "提示:您还没有登录或已超时,请重新登录! ", "/member/login.aspx ");
System.Web.HttpContext.Current.Response.End();
}
else
{
GetListPage();
}
}
public virtual void GetListPage() { }
站点:CDQYnet UserEdit.aspx.cs
protected void Page_Load(object sender, EventArgs e)
{
chkUser.chkUserLogin();
}
protected override void GetListPage()
{
UserID = Session[ "User_id "].ToString();
UserName = Session[ "User_name "].ToString();
if (!this.IsPostBack) { ShowData(); }
}
问是:在chkUser.cs中出现错误
非静态的字段、方法或属性“CDQYClassLibrary.chkUser.GetListPage()”要求对象引用 D:\!ayurep\成都企业站CDQY\00_DotNet\CDQYClassLibrary\chkUser.cs 43 17 CDQYClassLibrary
我的方法在站点里,验证在类里面.
不知道要怎么除这个错,能让类执行到站点里的方法?谢谢
------解决方案--------------------
站点是什么?