帮我看aspx中的一个form

来源:百度知道 编辑:UC知道 时间:2024/06/18 09:22:16
<form id="frmLogin" name="frmLogin" method="post" runat="server">
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td vAlign="top" align="right" width="65%"><font color="#ffffff" size="3">用户:</font>
<asp:textbox class="input" id="txtLoginName" runat="server" Height="22" Font-Size="12" Width="100px"></asp:textbox><br>
<font color="#ffffff" size="3">密码:</font>
<asp:textbox class="input" id="txtPassWord" runat="server" Height="22" Font-Size="12" Width="100px" TextMode="Password"></asp:textbox></td>

<asp:imagebutton id="cmdLogin" runat="server" ImageUrl="../images/skin/logok.gif"></asp:imagebutton>
后台cs文件中应该有这个imagebutton的点击事件处理代码
imagebutton是服务器控件点击就触发了服务器端click事件

因为form里有runat="server",编译的时候会自动加上其它代码。这就是ASPX的优点。