distitlecontrol.ascx

来自「ASP C#代码实例 适合初学人士学习使用」· ASCX 代码 · 共 41 行

ASCX
41
字号
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="DisTitleControl.ascx.cs" Inherits="Example_10_5.DisTitleControl" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<table cellpadding="0" cellspacing="0" width="600" border="0" height="90">
	<tr valign="top">
		<td valign="top"><asp:DataGrid ID="DisTitleList" Runat="server" Width="100%" Height="32px" AutoGenerateColumns="False"
				ItemStyle-BorderStyle="Solid" ItemStyle-BorderWidth="1" BorderColor="MistyRose" BorderWidth="1" BorderStyle="Solid"
				PageSize="3" ShowHeader="False" ItemStyle-Height="30">
				<ItemStyle Height="30px" BorderWidth="1px" BorderStyle="Solid" Width="100%"></ItemStyle>
				<Columns>
					<asp:TemplateColumn>
						<ItemTemplate>
							<asp:LinkButton id="DisTitle" Width="180" Runat="server" CommandName="link" CommandArgument='<%#areaId + "&TitleID=" + DataBinder.Eval(Container.DataItem,"TitleID") %>' CssClass="Normal" Text='<%# DataBinder.Eval(Container.DataItem, "Title") %>'>
							</asp:LinkButton>
						</ItemTemplate>
					</asp:TemplateColumn>					
					<asp:TemplateColumn>
						<ItemTemplate>
							<table width="80" align="center">
								<tr>
									<td align="right">
										<asp:Label ID="AnswerNum" CssClass="NumberText" Runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"AnswerNum") %>'>
										</asp:Label>
									</td>
									<td><font class="NumberText">|</font></td>
									<td align="left">
										<asp:Label ID="PersonNum" CssClass="NumberText" Runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"LookNum") %>'>
										</asp:Label>
									</td>
								</tr>
							</table>
						</ItemTemplate>
						<FooterStyle HorizontalAlign="Center"></FooterStyle>
					</asp:TemplateColumn>
					<asp:BoundColumn DataField="UpdateDate">
						<ItemStyle Width="130px" CssClass="NumberText" BackColor="FloralWhite"></ItemStyle>
					</asp:BoundColumn>					
				</Columns>
			</asp:DataGrid>
		</td>
	</tr>
</table>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?