Today I'm bored with leisure. I remember. asp.net authentication. Feel good. Post the following code:
Login.aspx HTML code
<%@ Page language= "C #" codebehind= "02login.aspx.cs" autoeventwireup= "false" inherits= "authentication. _02login"%>
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<HTML>
<HEAD>
<title>02Login</title>
<meta name= "generator" content= "Microsoft Visual Studio. NET 7.1" >
<meta name= "Code_language" content= "C #" >
<meta name= "vs_defaultClientScript" content= "JavaScript" >
<meta name= "vs_targetschema" content= "http://schemas.microsoft.com/intellisense/ie5" >
</HEAD>
<body ms_positioning= "GridLayout" >
<form id= "Form1" method= "POST" runat= "Server" >
<font face= "Song Body" >
<table id= "Table1" style= "z-index:102; left:152px; width:446px; Position:absolute; top:80px; Height:72px "
cellspacing= "1" cellpadding= "1" width= "446" border= "1" >
<TR>
<TD>
<asp:label id= "Label1" runat= "Server" > User name:</asp:label></td>
<TD>
<asp:textbox id= "Tbname" runat= "Server" width= "183px" ></asp:textbox></TD>
<TD>
<asp:requiredfieldvalidator id= "RequiredFieldValidator1" runat= "Server" errormessage= username cannot be empty! "Controltovalidate=" Tbname "></asp:requiredfieldvalidator></TD>
</TR>
<TR>
<TD>
<asp:label id= "Label2" runat= "server" > Password:</asp:label></td>
<TD>
<asp:textbox id= "Tbpass" runat= "Server" width= "183px" ></asp:textbox></TD>
<TD>
<asp:requiredfieldvalidator id= "RequiredFieldValidator2" runat= "errormessage=" Password cannot be empty! "Controltovalidate=" Tbpass "></asp:requiredfieldvalidator></TD>
</TR>
<TR>
<td><font face= "Song body" > Whether to save cookie</font></td>
<TD>
<asp:checkbox id= "Persistcookie" runat= "Server" ></asp:checkbox></TD>
<TD></TD>
</TR>
</TABLE>
<asp:button id= "Btnloginbetter" style= "Z-INDEX:101; left:288px; Position:absolute; top:240px "
runat= "Server" width= "78px" text= "Login" ></asp:button>
<asp:hyperlink id= "HyperLink1" style= "z-index:103; left:456px; Position:absolute; top:240px "
runat= "Server" Navigateurl= "default.aspx" >HyperLink</asp:HyperLink></FONT>
</form>
</body>
</HTML>
Total 3 page: previous 1 [2] [3] Next page