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

.net编程

开发平台:

Visual C++

  1. <%@ page language="C#" autoeventwireup="true" inherits="news, 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. <link href="include/css.css" rel="Stylesheet" type="text/css" />
  9. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  10. <title>简单入门新闻系统</title>
  11. </head>
  12. <body>
  13.     <form id="form1" runat="server">
  14.     <div>
  15.         <uc1:top id="Top1" runat="server">
  16.         </uc1:top>
  17. <table border="0" cellpadding="0" cellspacing="0" width="900" style="margin-top:8px;">
  18.     <tr>
  19.          <td width="20" style="height: 19px"><img src="images/location-items.gif" /></td>
  20.           <td colspan="2" class="tops">&nbsp;<a href="index.aspx">网站首页</a>  -&gt; <asp:Label ID="Label4" runat="server"></asp:Label></td>
  21.      </tr>
  22. </table>
  23.       <table width="900" border="0" align="center" cellpadding="0" cellspacing="0" class="table_top">
  24.   <tr>
  25.        <td valign="top">
  26.  <table border="0" cellpadding="0" cellspacing="0" class="kkk" width="642">
  27.          <tr>
  28.             <td colspan="3" class="new_tit"><div class="new_tit1"> 资讯列表</div></td>
  29.          </tr>
  30.          <tr>
  31.             <td valign="top" colspan="3" style="height: 550px">
  32.                             <asp:DataList ID="DataList1" runat="server" RepeatLayout="Flow" EnableViewState="false">
  33.                                 <ItemTemplate>
  34.                                     <table style="width: 98%; border-bottom: lightgrey 1px solid;" cellpadding="5">
  35.                                         <tr>
  36.                                             <td colspan="3" style="padding-left: 10px; font-weight: bold; font-size: 14px; height: 21px; text-align: left">
  37.                                                 &nbsp;<img src="images/ArticleCommon.gif" />&nbsp;<a href="NewsShow.aspx?id=<%# Eval("id") %>"><%# Eval("title") %></a></td>
  38.                                         </tr>
  39.                                         <tr>
  40.                                             <td colspan="3" style="font-size: 12px; color: dimgray; text-indent: 20px; text-align: left">
  41.                                             <%#(System.Text.RegularExpressions.Regex.Replace(DataBinder.Eval(Container.DataItem, "contents").ToString(), "<[^>]*>", "").Length<140)?(System.Text.RegularExpressions.Regex.Replace(DataBinder.Eval(Container.DataItem, "contents").ToString(), "<[^>]*>", "")):(System.Text.RegularExpressions.Regex.Replace(DataBinder.Eval(Container.DataItem, "contents").ToString(), "<[^>]*>", "").Substring(0,140)) %>……<a href="NewsShow.aspx?id=<%# Eval("id") %>">[阅读全文]</a>
  42.                                             </td>
  43.                                         </tr>
  44.                                         <tr>
  45.                                             <td style="padding-left: 20px; font-size: 12px; width: 150px; text-align: left">
  46.                                             作者:<%# Eval("oAuthor") %> 
  47.                                             </td>
  48.                                             <td style="font-size: 12px; width: 150px; text-align: left">时间:<%# Eval("data") %> 
  49.                                             </td>
  50.                                             <td style="font-size: 12px; text-align: left">人气:<%# Eval("hklick")%>
  51.                                             </td>
  52.                                         </tr>
  53.                                     </table>
  54.                                 </ItemTemplate>
  55.                             </asp:DataList>
  56.                             <p>
  57.                             <asp:HyperLink id="HyperLink1" runat="server">首页</asp:HyperLink>
  58.     <asp:HyperLink id="Hyperlink2" runat="server">上一页</asp:HyperLink>
  59.     <asp:HyperLink id="Hyperlink3" runat="server">下一页</asp:HyperLink>
  60.     <asp:HyperLink id="Hyperlink4" runat="server">尾页</asp:HyperLink>
  61.     <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
  62.     <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
  63.     <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label><br /></p>
  64.               </td>
  65.             </tr>
  66.           </table>      
  67. </td> 
  68.     <td width="6"></td>
  69.     
  70. <td valign="top">
  71. <uc2:search ID="Search1" runat="server" />
  72. <table border="0" cellpadding="0" cellspacing="0" class="gonggao" style="width:250px; margin-top: 10px;">
  73.       <tr>
  74.          <td class="gonggaoback1" style="height: 30px"> <img src="images/index1_r33_c16.gif" start="" /></td>
  75.          <td class="gonggaoback2" style="height: 30px; width: 70%;"> 热门TOP10</td>
  76.          <td class="gonggaoback3" style="height: 30px">  &gt;&gt;更多</td>
  77.       </tr>
  78.       <tr>
  79.          <td colspan="3" rowspan="2" style="text-align: left">
  80.           <asp:DataList ID="DataList2" runat="server">
  81. <HeaderTemplate><table border="0" width="100%"></HeaderTemplate>
  82.    <itemtemplate>
  83.      <tr>
  84.        <td align="left" width="210">&nbsp; <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>
  85.        <td><%# Eval("hklick") %></td>
  86.       </tr>
  87.    </itemtemplate>
  88.    <FooterTemplate></table></FooterTemplate>
  89.   </asp:DataList> </td>
  90.        </tr>
  91. </table>
  92.         <table border="0" cellpadding="0" cellspacing="0" class="gonggao" width="250" style="margin-top: 10px;">
  93.                         <tr>
  94.                             <td class="gonggaoback1" style="height: 30px">
  95.                                 <img src="images/index1_r33_c16.gif" start="" /></td>
  96.                             <td class="gonggaoback2" style="height: 30px"> 图文资讯</td>
  97.                             <td class="gonggaoback3" style="height: 30px">&gt;&gt;更多</td>
  98.                         </tr>
  99.                         <tr>
  100.                             <td colspan="3" rowspan="2" style="text-align: left">
  101.                                 <asp:DataList ID="DataList4" runat="server" RepeatColumns="2" RepeatDirection="Horizontal">
  102.                                     <ItemTemplate>
  103. <table>
  104.   <tr>
  105.     <td><div class="pina"><a href="NewsShow.aspx?id=<%# Eval("id") %>"><img src="<%# Eval("picurl") %>" height="85" width="113" border="0" /></a></div></td>
  106.   </tr>
  107.   <tr>
  108.     <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>
  109.   </tr>
  110. </table>
  111.                                     </ItemTemplate>
  112.                                 </asp:DataList></td>
  113.                         </tr>
  114.                         <tr>
  115.                         </tr>
  116.                     </table>
  117. </td>
  118.   </tr>
  119. </table>
  120.         <uc0:bottom id="bottom" runat="server">
  121.         </uc0:bottom>
  122.         </div>
  123.     </form>
  124. </body>
  125. </html>