asp.net

位置:IT落伍者 >> asp.net >> 浏览文章

ASP.NET项目开发指南:界面控件设计(2)[1]


发布日期:2019年02月10日
 
ASP.NET项目开发指南:界面控件设计(2)[1]

界面控件设计(

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=>&nbsp;

<asp:textbox id=username runat=server

BorderStyle=Solid Width=px CssClass=inputlog>

</asp:textbox></TD></TR><TR>

<TD style=WIDTH: px align=right>密&nbsp;&nbsp;&nbsp;

</TD>

<TD>&nbsp;

<asp:textbox id=userpass runat=server

BorderStyle=Solid Width=px

CssClass=inputlogTextMode=Password></asp:textbox></TD>

</TR><TR>

<TD colSpan=>&nbsp;

<asp:button id=Button runat=server

BorderStyle=Solid Width=px Text=登录

onclick=Button_Click></asp:button><FONT face=宋体>&nbsp;</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>&nbsp;&nbsp;<FONT face=宋体>&nbsp;</FONT></TD>

</TR>

</TABLE>

</asp:panel></td>

</tr>

</table>

【代码说明】代码第~行通过个Table完成了布局其中最外侧是一个Table然后注册控件和验证通过后界面的控件分别由一个Table来控制这两个Table又分别加在两个Panel中因为Panel的属性runat=server表示其运行在服务器端所以后面还会通过它来控制两个控件的显示和隐藏

[] []

               

上一篇:ASP.NET项目开发指南:界面控件设计(1)

下一篇:ASP.NET项目开发指南:界面控件设计(2)[2]