如何在后台调用这个函数?调用函数时传什么参数?为什么函数中是Page page
usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebCon...
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// UserBiz 的摘要说明
/// </summary>
public class UserBiz
{
public UserBiz()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public static UserVo CheckSession(Page page)
{
if (page.Session["myuser"] == null)
{
page.Response.Write("<script>top.location.href='../login.aspx'</script>");
page.Response.End();
}
return (UserVo)page.Session["myuser"];
}
} 展开
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// UserBiz 的摘要说明
/// </summary>
public class UserBiz
{
public UserBiz()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
public static UserVo CheckSession(Page page)
{
if (page.Session["myuser"] == null)
{
page.Response.Write("<script>top.location.href='../login.aspx'</script>");
page.Response.End();
}
return (UserVo)page.Session["myuser"];
}
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询