界面控件设计()
ST_kuserleftascx控件的HTML主要代码及其解释
页面中都是一些基本的用户控件最主要的就是登录和注册按钮以及供用户输入信息的文本框如程序所示
程序 ST_kuserleftascx
<table height= cellSpacing= cellPadding= width=
align=center bgColor=# border=>
<tr>
<td align=center bgColor=#ffffff><asp:panel id=Panel
runat=server>
<TABLE cellSpacing= cellPadding= width= border=>
<TR>
<TD align=center colSpan=><FONT
color=#cc><STRONG>::用户登录</STRONG></FONT></TD>
</TR><TR>
<TD style=WIDTH: px align=right width=>用户名
</TD>
<TD width=>
<asp:textbox id=username runat=server
BorderStyle=Solid Width=px CssClass=inputlog>
</asp:textbox></TD></TR><TR>
<TD style=WIDTH: px align=right>密
码</TD>
<TD>
<asp:textbox id=userpass runat=server
BorderStyle=Solid Width=px
CssClass=inputlogTextMode=Password></asp:textbox></TD>
</TR><TR>
<TD colSpan=>
<asp:button id=Button runat=server
BorderStyle=Solid Width=px Text=登录
onclick=Button_Click></asp:button><FONT face=宋体> </FONT>
<asp:button id=Button runat=server
BorderStyle=Solid Width=px Text=注册
nclick=Button_Click></asp:button>
</TD>
</TR>
</TABLE>
</asp:panel>
<asp:panel id=Panel runat=server>
<TABLE cellSpacing= cellPadding= width= border=>
<TR>
<TD align=center><FONT color=#cc><STRONG>::用户中
心</STRONG></FONT></TD>
</TR>
<TR>
<TD align=center>欢迎您
<asp:Label id=Label
runat=server>Label</asp:Label><BR>
<FONT face=宋体
color=#cc></FONT><BR>
您可以进行以下操作</TD>
</TR>
<TR>
<TD align=center>
<TABLE cellSpacing= cellPadding= width=% border=>
<TR>
<TD><FONT color=#cc><A href=ST_userinfoeditaspx>
修改注册资料</A></FONT></TD>
</TR><TR>
<TD><FONT color=#cc><A
href=ST_userorderlistaspx>
我的订单</A></FONT></TD>
</TR><TR>
<TD><FONT color=#cc><A href=ST_kprolistaspx>
断续订购</A></FONT></TD>
</TR><TR>
<TD><FONT color=#cc>
<A href=ST_contralleraspx?cname=logout>退出</A></FONT></TD>
</TR>
</TABLE>
</TD></TR>
<TR>
<TD> <FONT face=宋体> </FONT></TD>
</TR>
</TABLE>
</asp:panel></td>
</tr>
</table>
【代码说明】代码第~行通过个Table完成了布局其中最外侧是一个Table然后注册控件和验证通过后界面的控件分别由一个Table来控制这两个Table又分别加在两个Panel中因为Panel的属性runat=server表示其运行在服务器端所以后面还会通过它来控制两个控件的显示和隐藏
[] []