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

.net编程

开发平台:

Visual C++

  1. <%@ page language="C#" autoeventwireup="true" inherits="query, oyaya" %>
  2. <%@ Register Src="include/top.ascx" TagName="top" TagPrefix="uc1" %>
  3. <%@ Register Src="include/search.ascx" TagName="search" TagPrefix="uc2" %>
  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.  <table width="900" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:10px; margin-bottom:10px;">
  17.       <tr>
  18.         <td width="642" valign="top">
  19.  <table border="0" cellpadding="0" cellspacing="0" class="kkk" width="642">
  20.          <tr>
  21.             <td colspan="3" class="new_tit"><div class="new_tit1"> 搜索列表</div></td>
  22.          </tr>
  23.          <tr>
  24.             <td valign="top" colspan="3" style="height: 640px">
  25.                      <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" GridLines="None" ShowHeader="False" Width="640px" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging">
  26.                 <Columns>
  27.                 <asp:TemplateField>
  28.                 <ItemTemplate>
  29.                 <table style="width: 100%; border-bottom: lightgrey 1px solid;" cellpadding="5">
  30.                                         <tr>
  31.                                             <td colspan="3" class="quer">
  32.                                                 &nbsp;<img src="images/ArticleCommon.gif" />&nbsp;<a href="NewsShow.aspx?id=<%# Eval("id") %>"><%# Eval("title") %></a></td>
  33.                                         </tr>
  34.                                         <tr>
  35.                                             <td colspan="3" style="font-size: 12px; color: dimgray; text-indent: 20px; text-align: left">
  36.                                             <%#(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>
  37.                                             </td>
  38.                                         </tr>
  39.                                         <tr>
  40.                                             <td style="padding-left: 20px; font-size: 12px; width: 150px; text-align: left">
  41.                                             作者:<%# Eval("oAuthor") %> 
  42.                                             </td>
  43.                                             <td style="font-size: 12px; width: 150px; text-align: left">时间:<%# Eval("data") %> 
  44.                                             </td>
  45.                                             <td style="font-size: 12px; text-align: left">人气:<%# Eval("hklick")%>
  46.                                             </td>
  47.                                         </tr>
  48.                    </table>
  49.                  </ItemTemplate>
  50.                 </asp:TemplateField>
  51.                 </Columns>
  52.                 </asp:GridView>
  53.                             <p>
  54.                             <asp:HyperLink id="HyperLink1" runat="server">首页</asp:HyperLink>
  55.     <asp:HyperLink id="Hyperlink2" runat="server">上一页</asp:HyperLink>
  56.     <asp:HyperLink id="Hyperlink3" runat="server">下一页</asp:HyperLink>
  57.     <asp:HyperLink id="Hyperlink4" runat="server">尾页</asp:HyperLink>
  58.     <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
  59.     <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
  60.     <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label></p>
  61.                             </td>
  62.                     </tr>
  63.                 </table>      
  64. </td>
  65.         <td width="159" rowspan="2" valign="top" style="width: 6px"></td>
  66.         <td width="250" rowspan="2" valign="top" style="height: 22px; width: 250px;">
  67. <uc2:search ID="Search1" runat="server" /> </td>
  68.       </tr>
  69. </table>
  70. <uc0:bottom id="bottom" runat="server">
  71.         </uc0:bottom>
  72.         </div>
  73.     </form>
  74. </body>
  75. </html>