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

.net编程

开发平台:

Visual C++

  1. <%@ page language="C#" autoeventwireup="true" inherits="_Default, oyaya" %>
  2. <%@ Register Src="include/top.ascx" TagName="top" TagPrefix="uc1" %>
  3. <%@ Register Src="include/bottom.ascx" TagName="bottom" TagPrefix="uc0" %>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml" >
  6. <head runat="server">
  7. <title>凹丫丫简单新闻系统(ASP.NET2.0+SQL2005)</title>
  8. <meta content="www.oyaya.cn,版权归凹丫丫所有,凹丫丫设计室提供专业的网站设计维护制作服务" name="author" />
  9. <link runat="server" href="include/css.css" rel="Stylesheet" type="text/css" />
  10. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  11. </head>
  12. <body>
  13.     <form id="form1" runat="server">
  14.     <div>
  15.      <uc1:top id="Top1" runat="server"></uc1:top>
  16.       <div style="width: 903px; padding-right:10px;">
  17.                <table style="margin-top: 10px; padding-left:5px;" border="0" cellpadding="0" cellspacing="0">
  18.             <tr>
  19.                 <td colspan="3" width="280" valign="top"><iframe width="280" height="220" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="PicsNews.aspx"></iframe>
  20.                 <table width="280" border="0" cellspacing="0" cellpadding="0">
  21.   <tr>
  22.     <td rowspan="2" style="width:90px; height:54px; background-image: url(./images/search.gif);">&nbsp;</td>
  23.     <td><asp:TextBox ID="TextBox1" runat="server" Width="160px" Columns="11"></asp:TextBox></td>
  24.   </tr>
  25.   <tr>
  26.     <td><asp:DropDownList ID="DropDownList1" runat="server">
  27.                         <asp:ListItem Value="1">文章标题</asp:ListItem>
  28.                         <asp:ListItem Value="2">文章内容</asp:ListItem>
  29.                     </asp:DropDownList>
  30.         &nbsp;&nbsp;<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="查询" /></td>
  31.   </tr>
  32. </table>
  33.                 </td>
  34.                 <td style="width: 10px"></td>
  35.                 <td valign="top">
  36.                 <table border="0" cellpadding="0" cellspacing="0" class="gonggao" width="350">
  37.                         <tr>
  38.                             <td class="gonggaoback1"><img src="images/icon_bjb.gif" /></td>
  39.                             <td class="gonggaoback2">最新资讯</td>
  40.                             <td class="gonggaoback3"><img src="images/new5.gif" /></td>
  41.                         </tr>
  42.                         <tr>
  43.                             <td colspan="3" rowspan="2" style="text-align: left; padding-bottom: 6px;">
  44.                                 <asp:Repeater ID="Repeater1" runat="server">
  45.                                     <HeaderTemplate><ul class="newslist1"></HeaderTemplate>
  46.                                     <ItemTemplate>
  47.                                             <li><span>[<%# Convert.ToDateTime(Eval("data")).ToString("MM-dd")%>]</span> ● <a href="NewsShow.aspx?id=<%# Eval("id") %>"  class="mainlink"><%#((DataBinder.Eval(Container.DataItem, "title" ).ToString().Length<20)?DataBinder.Eval(Container.DataItem, "title" ).ToString():DataBinder.Eval(Container.DataItem, "title" ).ToString().Substring(0,20)+"...")%></a></li>
  48.                                     </ItemTemplate>
  49.                                     <FooterTemplate></ul></FooterTemplate>
  50.                                 </asp:Repeater>
  51. </td>
  52.                         </tr>
  53.                     </table>
  54.                 </td>
  55.                 <td style="width: 10px">
  56.                 </td>
  57.                 <td valign="top" style="text-align: right; width: 250px;"><table border="0" cellpadding="0" cellspacing="0" class="gonggao">
  58.                         <tr>
  59.                             <td class="gonggaoback1"> <img src="images/index1_r33_c16.gif" /></td>
  60.                             <td class="gonggaoback2"> 热门图片</td>
  61.                             <td class="gonggaoback3">&gt;&gt;更多</td>
  62.                         </tr>
  63.                         <tr>
  64.                             <td colspan="3" rowspan="2" style="padding-bottom:5px;">
  65.                             <asp:DataList ID="DataList5" runat="server" RepeatColumns="2" RepeatDirection="Horizontal">
  66.                                     <ItemTemplate>
  67. <div style="text-align:center;"><a href="NewsShow.aspx?id=<%# Eval("id") %>"><img src="<%# Eval("picurl") %>" height="83" width="113" border="0" vspace="5" /></a>
  68. <a href="NewsShow.aspx?id=<%# Eval("id") %>"><%#((DataBinder.Eval(Container.DataItem, "title" ).ToString().Length<8)?DataBinder.Eval(Container.DataItem, "title" ).ToString():DataBinder.Eval(Container.DataItem, "title" ).ToString().Substring(0,8)+"...")%></a></div>
  69.                                     </ItemTemplate>
  70.                                 </asp:DataList>
  71.                             </td>
  72.                         </tr>
  73.                         <tr>
  74.                         </tr>
  75.                     </table>
  76.                 </td>
  77.             </tr>
  78.         </table>
  79.         <img width="900" src="images/AD_985-86.jpg" vspace="2" style="padding-left:5px;" />
  80.       <asp:DataList ID="DataList2" EnableViewState="false" runat="server" RepeatColumns="3" RepeatDirection="Horizontal">
  81.             <ItemTemplate>
  82.                 <div class="gonggao indexa">
  83.                  <div class="indexb">
  84.                     <div class="indexc"><%# Eval("class_name") %></div>
  85.                     <div class="indexd"><a href="class.aspx?id=<%# Eval("id") %>">&gt;&gt;更多</a></div>
  86.                 </div>
  87.                 <ul class="newslist">
  88.                     <%#newsindex(Convert.ToInt32(DataBinder.Eval(Container.DataItem, "ID").ToString()))%>
  89.                  </ul>
  90.                 </div>
  91.             </ItemTemplate>
  92.       </asp:DataList>
  93.       </div>
  94.       <table class="link_bot" border="0" cellpadding="0" cellspacing="0">
  95.             <tr>
  96.                 <td class="link_td" colspan="3">
  97.                     
  98.                 </td>
  99.                 <td colspan="1" class="link_tdt">友情连接</td>
  100.                 <td colspan="1" class="link_td2"></td>
  101.             </tr>
  102.             <tr>
  103.                 <td class="link_content" colspan="5" rowspan="2">
  104.                     <asp:DataList EnableViewState="false" ID="DataList3" runat="server" RepeatDirection="Horizontal" RepeatColumns="10">
  105.                         <ItemTemplate>
  106.                             <asp:HyperLink ID="HyperLink1" runat="server" Height="21px" NavigateUrl='<%# Eval("url") %>'  Text='<%# Eval("title") %>' style="margin-right: 10px" Target="_blank"></asp:HyperLink>
  107.                         </ItemTemplate>
  108.                     </asp:DataList>
  109.                     <asp:DataList EnableViewState="false" ID="DataList1" runat="server" RepeatDirection="Horizontal" RepeatColumns="10">
  110.                         <ItemTemplate>
  111.                             <asp:HyperLink ID="HyperLink2" runat="server" Height="35px" ImageUrl='<%# Eval("logo") %>' NavigateUrl='<%# Eval("url") %>' Text='<%# Eval("title") %>' Width="88px" style="margin-right: 10px" Target="_blank"></asp:HyperLink>
  112.                         </ItemTemplate>
  113.                     </asp:DataList>
  114.                     </td>
  115.             </tr>
  116.         </table>
  117.      <uc0:bottom id="bottom" runat="server"></uc0:bottom>
  118.     </div>
  119.     </form>
  120. </body>
  121. </html>