Login login = new Login();
top = login.top;
text1f = login.text1f;
text2f = login.text2f;
请问一下这些都是什么意思啊 看了老半天就是不明白啊
Login login = new Login();
答案:2 悬赏:70 手机版
解决时间 2021-02-26 18:07
- 提问者网友:战皆罪
- 2021-02-25 22:03
最佳答案
- 五星知识达人网友:白昼之月
- 2021-02-25 23:34
自己写的Login类而已……
全部回答
- 1楼网友:低音帝王
- 2021-02-26 00:41
protected void login1_authenticate(object sender, authenticateeventargs e)
{
bool authenticated = false;
authenticated = sitelevelcustomauthenticationmethod(login1.username, login1.password);
e.authenticated = authenticated;
if (authenticated == true)
{
response.redirect("home.aspx");
}
}
private bool sitelevelcustomauthenticationmethod(string username, string password)
{
bool boolreturnvalue = false;
// insert code that implements a site-specific custom
// authentication method here.
// this example implementation always returns false.
//这里是你数据库的信息
string strconnection = "server=dtpxp-skumari;database=master;uid=sa;pwd=;";
sqlconnection connection = new sqlconnection(strconnection);
string strsql = "select * from employee";
sqlcommand command =new sqlcommand(strsql, connection);
sqldatareader dr;
connection.open();
dr=command.executereader();
while (dr.read())
{
if ((username == dr["name"].tostring()) & (password == dr["password"].tostring()))
{
boolreturnvalue = true;
}
dr.close();
return boolreturnvalue;
}
}
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯