读书人

一个简单的登录页面出错解决方案

发布时间: 2012-03-05 11:54:02 作者: rapoo

一个简单的登录页面出错
public partial class 登录1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

if (CheckLoginInfo(this.TBUserName.Text, this.TBPassWord.Text) > 0)
{
Session[ "UserName "] = this.TBUserName.Text;
string vFUserRole = Server.UrlEncode(GetRole(this.TBUserName.Text.ToUpper()));
string vParams;
vParams = "Default.aspx?UserRole= " + vFUserRole + "&PassWord= " + this.TBPassWord.Text + "&UserName= " + this.TBUserName.Text;
Server.Transfer(vParams);
}
else
{
Response.Write( " <script defer> alert( '登录信息有误! ');window.location=window.location; </script> ");
this.TBPassWord.Text = " ";
this.TBUserName.Text = " ";
}
}
}
显示 if (CheckLoginInfo(this.TBUserName.Text, this.TBPassWord.Text) > 0)
错误
当前上下文中不存在名称“CheckLoginInfo”
当前上下文中不存在名称“GetRole”




[解决办法]
你的页面里是否有CheckLoginInfo方法和GetRole方法呢?
[解决办法]
CheckLoginInfo方法贴出
[解决办法]
那就是不存在了~~~
或是写错了!
???

读书人网 >C#

热点推荐