全部代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript">
// <!CDATA[function IMG1_onclick() {}function TABLE1_onclick() {}// ]]>
</script>
</head>
<body background="">
<form id="form1" runat="server" >
<div>
<table style="width: 532px; height: 298px; left: 100px; position: absolute; top: 100px;" id="TABLE1" onclick="return TABLE1_onclick()">
<tr>
<td colspan="3" rowspan="3" style="background-image: url(image/考试系统登陆背景.jpg); width: 603px">
<asp:Label ID="Label1" runat="server" ForeColor="Fuchsia" Text="哈尔滨华夏计算机职业技术学院" Width="473px" style="font-size: 25pt; color: #ff00ff; font-style: normal; font-family: 华文行楷; text-decoration: none; z-index: 100; left: 31px; position: absolute; top: 23px;"></asp:Label>
<br />
<asp:Label ID="Label2" runat="server" ForeColor="Fuchsia" Text="网络考试系统" Width="171px" style="font-size: 20pt; color: #ff00ff; font-family: 华文行楷; z-index: 102; left: 175px; position: absolute; top: 68px;"></asp:Label>
<br />
<br />
<br />
<br />
<asp:Panel ID="Panel1" runat="server" Height="132px" Width="472px" BackColor="Transparent" >
学号:
<asp:TextBox ID="TextBox2" runat="server" OnTextChanged="TextBox2_TextChanged"></asp:TextBox><br />
姓名:
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><br />
密码:
<asp:TextBox ID="TextBox1" runat="server" TextMode="Password"></asp:TextBox><br />
<br />
<asp:CheckBox ID="CheckBox1" runat="server" Text="管理员登陆" /><br />
<asp:Button ID="Button1" runat="server" Height="79px" Text="登陆" Width="86px" style="font-size: 25pt; background-image: url(image/登陆按钮01.jpg); color: #000000; font-family: 华文彩云; z-index: 100; left: 272px; position: absolute; top: 132px; background-position: right top;" OnClick="Button1_Click" />
</asp:Panel>
</td>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
<br />
<br />
<br />
</div>
</form>
</body>
</html>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript">
// <!CDATA[function IMG1_onclick() {}function TABLE1_onclick() {}// ]]>
</script>
</head>
<body background="">
<form id="form1" runat="server" >
<div>
<table style="width: 532px; height: 298px; left: 100px; position: absolute; top: 100px;" id="TABLE1" onclick="return TABLE1_onclick()">
<tr>
<td colspan="3" rowspan="3" style="background-image: url(image/考试系统登陆背景.jpg); width: 603px">
<asp:Label ID="Label1" runat="server" ForeColor="Fuchsia" Text="哈尔滨华夏计算机职业技术学院" Width="473px" style="font-size: 25pt; color: #ff00ff; font-style: normal; font-family: 华文行楷; text-decoration: none; z-index: 100; left: 31px; position: absolute; top: 23px;"></asp:Label>
<br />
<asp:Label ID="Label2" runat="server" ForeColor="Fuchsia" Text="网络考试系统" Width="171px" style="font-size: 20pt; color: #ff00ff; font-family: 华文行楷; z-index: 102; left: 175px; position: absolute; top: 68px;"></asp:Label>
<br />
<br />
<br />
<br />
<asp:Panel ID="Panel1" runat="server" Height="132px" Width="472px" BackColor="Transparent" >
学号:
<asp:TextBox ID="TextBox2" runat="server" OnTextChanged="TextBox2_TextChanged"></asp:TextBox><br />
姓名:
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox><br />
密码:
<asp:TextBox ID="TextBox1" runat="server" TextMode="Password"></asp:TextBox><br />
<br />
<asp:CheckBox ID="CheckBox1" runat="server" Text="管理员登陆" /><br />
<asp:Button ID="Button1" runat="server" Height="79px" Text="登陆" Width="86px" style="font-size: 25pt; background-image: url(image/登陆按钮01.jpg); color: #000000; font-family: 华文彩云; z-index: 100; left: 272px; position: absolute; top: 132px; background-position: right top;" OnClick="Button1_Click" />
</asp:Panel>
</td>
</tr>
<tr>
</tr>
<tr>
</tr>
</table>
<br />
<br />
<br />
</div>
</form>
</body>
</html>
private void TextBox2_TextChanged(object sender, EventArgs e)
{}
就可以了
改为
学号:
<asp:TextBox ID="TextBox2" runat="server"> </asp:TextBox> <br />
姓名:
学号:
<asp:TextBox ID="TextBox2" runat="server" OnTextChanged="TextBox2_TextChanged"> </asp:TextBox> <br />
改为
学号:
<asp:TextBox ID="TextBox2" runat="server" ></asp:TextBox> <br />