📄 masterchild.aspx
字号:
<%@Page Language="VB" Inherits="BaseClass" Src="MasterChild.vb" %>
<html>
<head>
<title>DataGrid Samples - Step 3</title>
</head>
<body>
<h1> Master Child Example </h1>
<form runat=server>
<table width="95%">
<tr>
<td valign="top">
<b>Authors:</b><br>
<asp:DataGrid id="authorsGrid" runat="server"
AutoGenerateColumns="false"
BackColor="White"
BorderWidth="1px" BorderStyle="Solid" BorderColor="Tan"
CellPadding="2" CellSpacing="0"
Font-Name="Verdana" Font-Size="8pt"
DataKeyField="au_id"
OnSelectedIndexChanged="Grid_Select"
>
<Columns>
<asp:ButtonColumn Text="Select" CommandName="Select"/>
<asp:BoundColumn HeaderText="ID" DataField="au_id">
<HeaderStyle Width="100px"> </HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn HeaderText="Name" DataField="au_name">
<HeaderStyle Width="150px"></HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn HeaderText="State" DataField="state">
<HeaderStyle Width="50px"></HeaderStyle>
</asp:BoundColumn>
</Columns>
<HeaderStyle BackColor="DarkRed" ForeColor="White" Font-Bold="true">
</HeaderStyle>
<ItemStyle ForeColor="DarkSlateBlue">
</ItemStyle>
<AlternatingItemStyle BackColor="Beige">
</AlternatingItemStyle>
<SelectedItemStyle BackColor="PaleGoldenRod" Font-Bold="true">
</SelectedItemStyle>
</asp:DataGrid>
</td> <vr>
<td valign="top">
<asp:Panel id="detailsPanel" runat="server" Visible="false">
<table border="0" cellspacing="0" cellpadding="2" width="100%"
style="font-family: verdana; font-size: 8pt">
<b>Titles:</b><br>
<td colspan="2">
<asp:DataGrid id="titlesGrid" runat="server"
AutoGenerateColumns="false"
ShowFooter="true"
BackColor="White"
BorderWidth="1px" BorderStyle="Solid" BorderColor="Tan" CellPadding="2" CellSpacing="0"
Font-Name="Verdana" Font-Size="8pt"
>
<Columns>
<asp:BoundColumn HeaderText="ID" DataField="title_id">
<HeaderStyle Width="100px">
</HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn HeaderText="Title" DataField="title">
<HeaderStyle Width="250px">
</HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn HeaderText="Published" DataField="pubdate" DataFormatString="{0:MMM yyyy}">
<HeaderStyle Width="100px">
</HeaderStyle>
</asp:BoundColumn>
<asp:BoundColumn HeaderText="Price" DataField="price" DataFormatString="{0:c}">
<HeaderStyle Width="50px">
</HeaderStyle>
<ItemStyle HorizontalAlign="Right">
</ItemStyle>
</asp:BoundColumn>
</Columns>
<HeaderStyle BackColor="DarkRed" ForeColor="White" Font-Bold="true">
</HeaderStyle>
<FooterStyle BackColor="Tan">
</FooterStyle>
<ItemStyle ForeColor="DarkSlateBlue">
</ItemStyle>
<AlternatingItemStyle BackColor="Beige">
</AlternatingItemStyle>
</asp:DataGrid>
</td>
</tr>
</table>
</asp:Panel>
</td> </tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -