⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m-announcement.aspx

📁 中文asp.net留言本 介绍了留言簿的实现过程
💻 ASPX
字号:
<%@ Page language="c#" Codebehind="m-announcement.aspx.cs" AutoEventWireup="false" Inherits="asp.net.cn.admin.m_rep" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>管理公告</title>
		<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<LINK href="../style.css" type="text/css" rel="stylesheet">
		<SCRIPT language="JavaScript">
            <!--
            //展开和关闭时候显示/隐藏子表信息
		
           function showDiv(img,div)
            {
                var img = document.getElementById(img);
                var div = document.getElementById(div);
                var picName = img.src;
                picName = picName.substring(picName.lastIndexOf("/")+1);
                if (picName.toLowerCase() == "open.gif")
                {
                    div.style.display ="block";
                    img.src = "../images/close.gif";
                }
                else
                {
                    div.style.display ="none";
                    img.src = "../images/open.gif";
                }
            }
           
            
            //-->
		</SCRIPT>
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<TABLE id="Table3" style="BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; Z-INDEX: 106; LEFT: 8px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 806px; BORDER-BOTTOM: #cccccc 1px solid; POSITION: static; TOP: 8px; HEIGHT: 200px"
				cellSpacing="0" cellPadding="0" width="806" align="center" border="0">
				<TR>
					<TD vAlign="middle" align="center" bgColor="#f7f7f7"><BR>
						<TABLE id="Table1" style="BORDER-RIGHT: #cccccc 2px solid; BORDER-TOP: #cccccc 2px solid; FONT-SIZE: 9pt; BACKGROUND: #f7f7f7; BORDER-LEFT: #cccccc 2px solid; WORD-BREAK: break-all; BORDER-BOTTOM: #cccccc 2px solid"
							height="25" cellSpacing="0" cellPadding="0" width="771" border="0">
							<TR align="center">
								<TD width="*">
									<asp:HyperLink id="HyperLink4" runat="server" NavigateUrl="main.aspx" Font-Size="10pt">后台首页</asp:HyperLink><IMG height="1" src="/images/bgt.gif" width="1"></TD>
								<TD class="menu_soft_title2" id="Td1">
									<asp:HyperLink id="HyperLink6" runat="server" NavigateUrl="sys_info.aspx">系统信息设置</asp:HyperLink></TD>
								<TD class="menu_soft_title1" id="Td2">
									<asp:HyperLink id="HyperLink3" runat="server" NavigateUrl="m-ly.aspx" Font-Size="10pt">留言管理</asp:HyperLink></TD>
								<TD class="menu_soft_title1" id="Td3">
									<asp:HyperLink id="HyperLink2" runat="server" NavigateUrl="m-announcement.aspx" Font-Size="9pt">管理公告</asp:HyperLink></TD>
								<TD class="menu_soft_title1" id="Td4">
									<asp:HyperLink id="HyperLink1" runat="server" NavigateUrl="change_password.aspx" Font-Size="10pt">修改密码</asp:HyperLink></TD>
								<TD class="menu_soft_title1" id="Td5">
									<asp:Button id="Button1" runat="server" Font-Size="9pt" Text="退出登陆"></asp:Button></TD>
								<TD class="menu_soft_title1" id="TabTitle">
									<asp:Button id="btn_w" runat="server" Font-Size="9pt" Text="忘记密码"></asp:Button></TD>
								<TD width="*"></TD>
							</TR>
						</TABLE>
						<BR>
						<TABLE id="Table2" style="BORDER-RIGHT: #cccccc 1px; BORDER-TOP: #cccccc 1px; BORDER-LEFT: #cccccc 1px; BORDER-BOTTOM: #cccccc 1px"
							cellSpacing="0" cellPadding="0" width="771" border="0">
							<TR>
								<TD vAlign="top" align="left" width="300" bgColor="#f7f7f7"><FONT face="宋体"> 当前页面:
										<asp:HyperLink id="HyperLink5" runat="server" Font-Size="9pt">管理公告</asp:HyperLink></FONT></TD>
								<TD vAlign="top" align="right" bgColor="#f7f7f7"><FONT face="宋体">
										<asp:Label id="lbl_c" runat="server" Font-Size="9pt"></asp:Label></FONT></TD>
							</TR>
						</TABLE>
						<BR>
						<asp:datagrid id="DataGrid1" runat="server" Width="744px" AutoGenerateColumns="False" Font-Size="9pt"
							BackColor="#FFFFF6" Height="0px" ShowHeader="False">
							<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
							<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></SelectedItemStyle>
							<ItemStyle ForeColor="#000066"></ItemStyle>
							<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#006699"></HeaderStyle>
							<Columns>
								<asp:TemplateColumn>
									<ItemTemplate>
										<TABLE height="1" width="767" border="0">
											<TR>
												<TD width="30">
													<asp:Label id=LblId Font-Size="9pt" Height="4px" Runat="server" Visible="False" text='<%# DataBinder.Eval(Container.DataItem,"id")%>'>
													</asp:Label>
													<asp:Image id="ImgOpen" style="CURSOR: hand" open="true" Runat="server" ImageUrl="../images/open.gif"></asp:Image></TD>
												<TD align="left" width="300">
													<asp:Label id="Label1" runat="server" Font-Size="9pt">留言人:</asp:Label>
													<asp:Label id=LblName Font-Size="9pt" Text='<%# DataBinder.Eval(Container.DataItem,"Name")%>' Runat="server">
													</asp:Label></TD>
												<TD align="left" width="317">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
													<asp:Label id="Label3" runat="server" Font-Size="9pt">日期:</asp:Label>
													<asp:Label id=Label4 runat="server" Font-Size="9pt" Text='<%# DataBinder.Eval(Container.DataItem,"date")%>'>lbltime</asp:Label></TD>
												<TD align="right" width="120">
													<asp:LinkButton id="LbtnEdit" Font-Size="9pt" Text="修改" Runat="server">修改公告</asp:LinkButton>&nbsp;&nbsp;
													<asp:LinkButton id="LbtnDel" Font-Size="9pt" Text="删除" Runat="server" CommandName="Delete"></asp:LinkButton></TD>
											</TR>
											<TR>
												<TD align="center" bgColor="#fefefe" colSpan="4">
													<asp:Panel id="PnlContent" style="DISPLAY: none" BackColor="Silver" Border="0" Runat="server">
														<asp:datagrid id=DgContent runat="server" Font-Size="9pt" ShowHeader="False" Height="0px" BackColor="White" AutoGenerateColumns="False" Width="510px" DataSource='<%# ((System.Data.DataRowView)(Container.DataItem)).CreateChildView("WorkTime") %>' BorderColor="#CCCCCC" CellPadding="2" BorderWidth="1px" BorderStyle="None">
															<FooterStyle ForeColor="#000066" BackColor="White"></FooterStyle>
															<SelectedItemStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></SelectedItemStyle>
															<ItemStyle ForeColor="#000066"></ItemStyle>
															<HeaderStyle Font-Bold="True" ForeColor="White" BackColor="#006699"></HeaderStyle>
															<Columns>
																<asp:TemplateColumn>
																	<ItemTemplate>
																		<FONT face="宋体"><FONT color="#99cccc"><FONT color="#cccccc">&nbsp;------------------------------------------------------------------------------------
																					<TABLE id="Table3" style="FONT-SIZE: 9pt; WORD-BREAK: break-all" height="120" cellSpacing="0"
																						cellPadding="0" width="510" border="0">
																						<TR>
																							<TD vAlign="top" align="center" width="110" rowSpan="2"><%# DataBinder.Eval(Container.DataItem,"sex")%><BR>
																								<BR>
																								<%# DataBinder.Eval(Container.DataItem,"name")%>
																							</TD>
																							<TD vAlign="middle" align="left" width="400">
																								<P>
																									<asp:Label id="Label2" runat="server" Font-Bold="True">
																										<%# DataBinder.Eval(Container.DataItem,"title") %>
																										<br>
																									</asp:Label>&nbsp;&nbsp;<%# DataBinder.Eval(Container.DataItem,"date") %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
																									<%# DataBinder.Eval(Container.DataItem,"website") %>
																									<%# DataBinder.Eval(Container.DataItem,"mail") %>
																									<%# DataBinder.Eval(Container.DataItem,"spc") %>
																								</P>
																								<P><FONT color="#99cccc">&nbsp;</FONT><FONT color="#cccccc">&nbsp;----------------------------------------------------------------</FONT></P>
																							</TD>
																						</TR>
																						<TR>
																							<TD vAlign="top" align="left" width="400" colSpan="1" rowSpan="1"><%# DataBinder.Eval(Container.DataItem,"message")%></TD>
																						</TR>
																					</TABLE>
																					<BR>
																				</FONT></FONT></FONT>
																	</ItemTemplate>
																</asp:TemplateColumn>
															</Columns>
															<PagerStyle HorizontalAlign="Left" ForeColor="#000066" Position="TopAndBottom" BackColor="White"
																Mode="NumericPages"></PagerStyle>
														</asp:datagrid>
													</asp:Panel></TD>
											</TR>
										</TABLE>
									</ItemTemplate>
								</asp:TemplateColumn>
								<asp:BoundColumn Visible="False" DataField="id"></asp:BoundColumn>
							</Columns>
							<PagerStyle HorizontalAlign="Left" ForeColor="#000066" Position="TopAndBottom" BackColor="White"
								Mode="NumericPages"></PagerStyle>
						</asp:datagrid><BR>
						<TABLE id="Table5" style="BORDER-RIGHT: #cccccc 1px; BORDER-TOP: #cccccc 1px; BORDER-LEFT: #cccccc 1px; BORDER-BOTTOM: #cccccc 1px"
							cellSpacing="0" cellPadding="0" width="771" border="0">
							<TR>
								<TD vAlign="top" align="right" bgColor="#f7f7f7"><FONT face="宋体">
										<asp:Label id="lbl_ts" runat="server" Font-Size="9pt" ForeColor="Red"></asp:Label>
										<asp:HyperLink id="HyperLink7" runat="server" Font-Size="9pt" NavigateUrl="announcement.aspx">添加公告</asp:HyperLink>
										<asp:Label id="lbl_c_b" runat="server" Font-Size="9pt"></asp:Label></FONT></TD>
							</TR>
						</TABLE>
						<BR>
					</TD>
				</TR>
			</TABLE>
		</form>
	</body>
</HTML>

⌨️ 快捷键说明

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