ST_RCatgManModuleascx的HTML代码
代码中最主要的是GridView控件它负责显示数据其他都是一些简单的Web控件如程序所示
程序 ST_RCatgManModuleascx
<TABLE cellSpacing= cellPadding= width=%>
<TR class=rheader>
<TD class=rheadercol align=left colSpan= height=>
房间类型管理
</TD>
</TR> <! SPACER ROW >
<TR class=rbody>
<TD class=rbodycol align=left width=% height=
colspan=>按类型名称<asp:textbox id=RNameTextBox runat=server
Width=px></asp:textbox>
<asp:button id=search runat=server Text=查询
BorderStyle=Groove></asp:button></TD>
</TR>
<TR class=rbody>
<TD class=rbodycol align=center colSpan= height=>
<!GridView控件 >
<asp:GridView id=dg_RCategoryList runat=server
Width=% PageSize= AutoGenerateColumns=False
BorderColor=Black DataKeyNames=ST_RCategoryId
AllowPaging=True onrowdeleting =GridView_Delete
onpageindexchanging =GridView_Page>
<AlternatingRowStyle
BackColor=#CCCCFF></AlternatingRowStyle>
<HeaderStyle FontBold=True
BackColor=#CCCCFF></HeaderStyle>
<Columns>
<asp:BoundField DataField=ST_RCategoryId
SortExpression= HeaderText=编号></asp:BoundField>
<asp:BoundField DataField=ST_Name HeaderText=类型名称>
</asp:BoundField>
<asp:BoundField DataField=ST_BedNum HeaderText=床位>
</asp:BoundField>
<asp:BoundField DataField=ST_Price HeaderText=价格>
</asp:BoundField>
<asp:HyperLinkField
DataNavigateUrlFields=ST_RCategoryId
DataNavigateUrlFormatString=
/ST_RCategoryEditaspx?RCategoryId={}
DataTextField=ST_RCategoryId HeaderText=修改
DataTextFormatString=详单 />
<asp:ButtonField Text=删除 HeaderText=删除
CommandName=Delete ButtonType=Button>
</asp:ButtonField>
</Columns>
<PagerSettings NextPageText=下一页 Mode=NextPrevious
PreviousPageText =上一页 />
</asp:GridView>
</TD></TR>
<TR>
<td width=% height=>
<!链接到添加新房间>
<a id=AddRCategoryLink href=<%=ST_PageBaseUrlBase +
/ST_RCategoryAddaspx%>>添加新房间类型</a></td>
<TD align=right>
<asp:button id=ShowAll runat=server
BorderStyle=Groove Text=全部显示
Visible=False></asp:button></TD>
</TR>
</TABLE>
返回目录ASPNET项目开发指南
编辑推荐
ASPNET MVC 框架揭秘
ASPNET开发宝典
ASP NET开发培训视频教程
[] []