解決了上面兩個問題
<%@ Page language=
c# Codebehind= login aspx cs
AutoEventWireup=false Inherits= secure login %>
<!DOCTYPE HTML PUBLIC//W C//DTD HTML Transitional//EN >
<HTML>
<HEAD>
<title>Secure Site</title>
<meta content=Microsoft Visual Studio name= GENERATOR >
<meta content=C# name= CODE_LANGUAGE >
<meta content=javascript name= vs_defaultClientScript >
<meta content=http://schemas microsoft com/intellisense/ie
name=vs_targetSchema >
</HEAD>
<body MS_POSITIONING=GridLayout >
<form id=login method= post runat= server >
<table cellSpacing=cellPadding= border= >
<tr>
<td vAlign=top align= left >
<asp:label id=Message Runat= server ForeColor= #ff >
</asp:label>
</td>
</tr>
<tr>
<td vAlign=top align= left >
<b>Email:</b>
</td>
</tr>
<tr>
<td vAlign=top align= left >
<asp:textbox id=username Runat= server Width= >
</asp:textbox>
</td>
</tr>
<tr>
<td vAlign=top align= left >
<b>Password:</b>
</td>
</tr>
<tr>
<td vAlign=top align= left >
<asp:textbox id=password Runat= server
Width=TextMode= Password >
</asp:textbox>
</td>
</tr>
<tr>
<td vAlign=top align= left >
<asp:checkbox id=saveLogin Runat= server
Text=<b>Save my login</b> >
</asp:checkbox>
</td>
</tr>
<tr>
<td vAlign=top align= right >
<asp:imagebutton id=btnLogin Runat= server
ImageUrl=/images/w k/login/btnLogin gif >
</asp:imagebutton>
</td>
</tr>
</table>
</form>
</body>
</HTML>
[
From:http://tw.wingwit.com/Article/program/net/201311/15689.html