如何在登录页面提供的登录控件中获取为ID和密码输入的值,以便在我的页面中进一步使用?我想在我的.cs页面上找到这些值。请用c#语言给出答案。
答案 0 :(得分:2)
答案 1 :(得分:0)
试试这个:
在aspx页面中:
<asp:Login runat="server" ID="lc" OnAuthenticate="lc_Authenticate"></asp:Login>
在aspx.cs页面中:
protected void lc_Authenticate(object sender, AuthenticateEventArgs e)
{
e.Authenticated = DoValidate(lc.UserName, lc.Password);
}