viewdocument.aspx

来自「精通网络应用系统开发 光盘 该书是人民邮电出版社出版的」· ASPX 代码 · 共 61 行

ASPX
61
字号
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ViewDocument.aspx.cs" Inherits="ViewDocument" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>浏览文档</title>

		<LINK href="../../Css/ASPNET2BaseCss.css" type="text/css" rel="stylesheet">
	</HEAD>
	<body leftMargin="0" topMargin="0">
		<form id="Form1" method="post" runat="server">
			<table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111"
				width="100%" height="1">
				<tr height="30">
					<td width="3%" bgcolor="#c0d9e6" class="GbText" background="../../Images/treetopbg.jpg"><font color="#006699" size="3"><img src="../../Images/moduleheaher.gif" width="16" height="16"></font></td>
					<td bgcolor="#c0d9e6" class="GbText" background="../../Images/treetopbg.jpg"><b>浏览文档</b></td>
				</tr>
			</table>
			<TABLE class="GbText" style="BORDER-COLLAPSE: collapse" borderColor="#93bee2" cellSpacing="0"
				cellPadding="0" width="100%" border="1">
				<TR height="30">
					<td align="left" valign="top">
<asp:GridView Width="100%" runat="server" ID="DocumentView" CssClass="GbText" AutoGenerateColumns="False">
    <Columns>
       <asp:TemplateField HeaderText="文档标题"  ItemStyle-HorizontalAlign="left" ItemStyle-Width="200">
          <ItemTemplate>
              <a href="#" onclick='window.showModalDialog("BrowserDocument.aspx?DocumentID=<%# Eval("DocumentID") %>",window,"dialogWidth:540px;DialogHeight=500px;status:no")'>
					<%# (Eval("Desn").ToString().Length>30)?Eval("Desn").ToString().Substring(0,30)+"...":Eval("Desn").ToString() %>
				</a>					                 
          </ItemTemplate>
       </asp:TemplateField>					          
       <asp:TemplateField HeaderText="最后浏览时间" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100">
          <ItemTemplate>
             <%# Eval("LastViewDate","{0:d}")%>
          </ItemTemplate>
       </asp:TemplateField>
       <asp:TemplateField HeaderText="最后浏览人" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100">
          <ItemTemplate>
             <%# Eval("LastViewer") %>
          </ItemTemplate>
       </asp:TemplateField>
       <asp:TemplateField HeaderText="浏览次数" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="100">
          <ItemTemplate>
             <%# Eval("ViewCount")%>
          </ItemTemplate>
       </asp:TemplateField>
    </Columns>
    <HeaderStyle BackColor="InactiveCaption" />
</asp:GridView></td>
				</TR>				
				<TR height="30">					
					<TD align="left"><FONT face="宋体">&nbsp;</FONT>
						<asp:button id="ReturnBtn" runat="server" Width="100px" CssClass="ButtonCss" Text="返      回"
							CausesValidation="False" OnClick="ReturnBtn_Click"></asp:button></TD>
				</TR>
			</TABLE>
		</form>
	</body>
</HTML>

⌨️ 快捷键说明

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