NewsShow.aspx
上传用户:tongfeicq
上传日期:2022-07-20
资源大小:2856k
文件大小:9k
源码类别:

.net编程

开发平台:

Visual C++

  1. <%@ page language="C#" autoeventwireup="true" inherits="news_show, oyaya" %>
  2. <%@ Register Src="include/search.ascx" TagName="search" TagPrefix="uc2" %>
  3. <%@ Register Src="include/top.ascx" TagName="top" TagPrefix="uc1" %>
  4. <%@ Register Src="include/bottom.ascx" TagName="bottom" TagPrefix="uc0" %>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml" >
  7. <head id="Head1" runat="server">
  8. <title>简单新闻发布系统</title>
  9. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  10. <link href="include/css.css" rel="stylesheet" type="text/css" />
  11. </head>
  12. <body>
  13.    <form id="form1" runat="server">
  14.    <uc1:top ID="Top1" runat="server" />
  15.    <div align="center">  
  16.    <table border="0" cellpadding="0" cellspacing="0" width="900" style="margin-top:8px;">
  17.     <tr>
  18.          <td width="20" style="height: 19px"><img src="images/location-items.gif" /></td>
  19.           <td colspan="2" class="tops">&nbsp;<a href="index.aspx">网站首页</a>  -&gt; <asp:Label ID="Label1" runat="server"></asp:Label>  -&gt; <asp:Label ID="Label2" runat="server"></asp:Label></td>
  20.      </tr>
  21. </table>
  22.    <table width="900" border="0" align="center" cellpadding="0" cellspacing="0" class="table_top">
  23.       <tr>
  24.         <td width="645" valign="top">
  25.                 <div style="width: 645px; height: 30px">
  26.             <div class="show1"></div>
  27.             <div class="show2">内容页面</div>
  28.             <div class="show3"></div>
  29.         </div>
  30.         <table width="100%" border="0" cellpadding="0" cellspacing="0" class="kkk">
  31.           <tr>
  32.             <td align="center" style="width: 643px"><br />
  33.               <asp:Repeater ID="Repeater1" runat="server">
  34.                 <ItemTemplate>
  35.                   <table width="642">
  36.                     <tr>
  37.                       <td class="title"><%#Eval("title") %></td>
  38.                     </tr>
  39. <tr>
  40.                       <td align="right" style="color:darkgray">文章来源:<%#Eval("oSource")%>  &nbsp;&nbsp;责任编辑:<%#Eval("oAuthor")%>  &nbsp;&nbsp;阅读次数:<%#Eval("hklick") %>  &nbsp;&nbsp;发布时间:<%#Eval("data") %>&nbsp;&nbsp;</td>
  41.                     </tr>
  42.                     <tr>
  43.                       <td align="left" class="content" valign="top" width="640" ><%#Eval("contents") %> </td>
  44.                     </tr>
  45.                   </table>
  46.                 </ItemTemplate>
  47.               </asp:Repeater>
  48.         <div style="width: 639px; text-align: center;">
  49.         <script language="javascript">
  50.             var infoid = '<%=Request.QueryString["id"] %>';
  51.             var classid = 'NewsShow';
  52.         </script>
  53.         <script language = "JavaScript" src ="include/mood.js"></script>
  54.         </div>
  55.                <div class="next">
  56.         下一篇:<asp:HyperLink ID="HyperLink1" runat="server">[HyperLink1]</asp:HyperLink>
  57.         </div>
  58.         <div class="Pre">
  59.             上一篇:<asp:HyperLink ID="HyperLink2" runat="server">[HyperLink2]</asp:HyperLink></div>
  60.             
  61.               <table style="margin-top: 20px; width: 638px;">
  62.             <tr>
  63.                 <td style="width: 150px; height: 27px">
  64.                     名称:<asp:TextBox ID="TextBox1" runat="server" Width="96px" CssClass="TextBox"></asp:TextBox></td>
  65.                 <td style="width: 130px;">
  66.                     验证码:<asp:TextBox ID="TextBox2" runat="server" Width="53px" CssClass="TextBox"></asp:TextBox>&nbsp;
  67.                 </td>
  68.                 <td style="width: 49px">
  69.                     <asp:ImageButton ID="ImageButton1" runat="server" CausesValidation="False" ImageUrl="~/include/checkcode.aspx"
  70.                         OnClick="ImageButton1_Click" /></td>
  71.                 <td style="text-align: left; width: 291px;">
  72.                     <asp:Button ID="Button1" runat="server" Text="发表评论" CssClass="Button" OnClick="Button1_Click" />
  73.                     <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"  ErrorMessage="名称?"></asp:RequiredFieldValidator>
  74.                     <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2"  ErrorMessage="验证码?"></asp:RequiredFieldValidator>
  75.                     <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3"  ErrorMessage="评论内容?"></asp:RequiredFieldValidator>
  76.                     </td>
  77.             </tr>
  78.             <tr>
  79.                 <td colspan="4">
  80.                     <asp:TextBox ID="TextBox3" runat="server" TextMode="MultiLine" Height="70px" CssClass="TextBox" Width="600px"></asp:TextBox></td>
  81.             </tr>
  82.         </table> 
  83.         <div style="width: 639px;text-align: center;">
  84.             <div class="pinglunlist">
  85.             <div class="pinglunlist1">
  86.                 <asp:Label ID="Label11" runat="server" Text="网友评论" style="float: left" ForeColor="White"></asp:Label><asp:HyperLink ID="HyperLink3" runat="server" style="float: right; padding-right: 10px;" ForeColor="White">[HyperLink3]</asp:HyperLink>
  87.             </div>
  88.             <asp:DataList ID="DataList2" runat="server">
  89.                 <ItemTemplate>
  90.                     <table border="0" cellpadding="5" cellspacing="0" class="pl">
  91.                         <tr>
  92.                             <td class="pl1">
  93.                                 <%=oyaya.web_name.ToString() %>网友:<asp:Label ID="Label8" runat="server" Text='<%# Eval("username") %>'></asp:Label>&nbsp;&nbsp;
  94.                                 于<asp:Label ID="Label10" runat="server" Text='<%# Eval("data") %>'></asp:Label>评论道:</td>
  95.                         </tr>
  96.                         <tr>
  97.                             <td style="text-indent: 20px; text-align: left">
  98.                                 <asp:Label ID="Label9" runat="server" Text='<%# Eval("conent") %>'></asp:Label></td>
  99.                         </tr>
  100.                     </table>
  101.                 </ItemTemplate>
  102.             </asp:DataList></div></div><br/>
  103.             </td>
  104.           </tr>
  105.         </table>
  106. </td>
  107.         <td width="6" valign="top">&nbsp;</td>
  108.         <td width="180" valign="top"> <uc2:search ID="Search1" runat="server" />
  109.         <table border="0" cellpadding="0" cellspacing="0" class="gonggao" width="250" style="margin-top: 10px;">
  110.                         <tr>
  111.                             <td class="gonggaoback1" style="height: 30px">
  112.                                 <img src="images/index1_r33_c16.gif" start="" /></td>
  113.                             <td class="gonggaoback2" style="height: 30px"> 图文资讯</td>
  114.                             <td class="gonggaoback3" style="height: 30px">&gt;&gt;更多</td>
  115.                         </tr>
  116.                         <tr>
  117.                             <td colspan="3" rowspan="2" style="text-align: left">
  118.                                 <asp:DataList ID="DataList4" runat="server" RepeatColumns="2" RepeatDirection="Horizontal">
  119.                                     <ItemTemplate>
  120. <table>
  121.   <tr>
  122.     <td><div class="pina"><a href="NewsShow.aspx?id=<%# Eval("id") %>"><img src="<%# Eval("picurl") %>" height="85" width="113" border="0" /></a></div></td>
  123.   </tr>
  124.   <tr>
  125.     <td><a href="e<%# Eval("id") %>.aspx"><%#((DataBinder.Eval(Container.DataItem, "title" ).ToString().Length<8)?DataBinder.Eval(Container.DataItem, "title" ).ToString():DataBinder.Eval(Container.DataItem, "title" ).ToString().Substring(0,8)+"...")%></a></td>
  126.   </tr>
  127. </table>
  128.                                     </ItemTemplate>
  129.                                 </asp:DataList></td>
  130.                         </tr>
  131.                         <tr>
  132.                         </tr>
  133.                     </table>
  134.                     <table border="0" cellpadding="0" cellspacing="0" class="gonggao" width="250">
  135.       <tr>
  136.          <td class="gonggaoback1" style="height: 30px"> <img src="images/index1_r33_c16.gif" start="" /></td>
  137.          <td class="gonggaoback2" style="height: 30px; width: 70%;"> 本类最新TOP10</td>
  138.          <td class="gonggaoback3" style="height: 30px">  &gt;&gt;更多</td>
  139.       </tr>
  140.       <tr>
  141.          <td colspan="3" rowspan="2" style="text-align: left">
  142.              <asp:DataList ID="DataList1" runat="server">
  143. <HeaderTemplate><table border="0" width="100%"></HeaderTemplate>
  144.    <itemtemplate>
  145.      <tr>
  146.           <td><img src="images/dot0.gif" /></td>
  147.        <td align="left" width="210"><a href="NewsShow.aspx?id=<%#Eval("id") %>"><%#(System.Text.RegularExpressions.Regex.Replace(DataBinder.Eval(Container.DataItem, "title").ToString(), "<[^>]*>", "").Length<18)?(System.Text.RegularExpressions.Regex.Replace(DataBinder.Eval(Container.DataItem, "title").ToString(), "<[^>]*>", "")):(System.Text.RegularExpressions.Regex.Replace(DataBinder.Eval(Container.DataItem, "title").ToString(), "<[^>]*>", "").Substring(0,18)) %>…</a></td>
  148.        <td><%# Eval("hklick") %></td>
  149.       </tr>
  150.    </itemtemplate>
  151.    <FooterTemplate></table></FooterTemplate>
  152.    </asp:DataList> </td>
  153.        </tr>
  154. </table>
  155.         </td>
  156.       </tr>
  157. </table>
  158.      <uc0:bottom id="bottom" runat="server">
  159.      </uc0:bottom>
  160.   </div>
  161.        
  162.   </form>
  163. </body>
  164. </html>