<pre class = "brush:js;toolbar:false;" ><%@ Page Language= "C#" MasterPageFile= "~/MasterPage.master" AutoEventWireup= "true"
CodeFile= "menu.aspx.cs" Inherits= "menu" Title= "无标题页" %>
<asp:Content ID= "Content1" ContentPlaceHolderID= "ContentPlaceHolder1" Runat= "Server" >
<form id= "form1" runat= "server" >
< style= "height: 300px" >
<asp:GridView ID= "GridView1" runat= "server" AutoGenerateColumns= "False"
DataSourceID= "SqlDataSource1" Height= "299px"
Width= "544px" AllowPaging= "True" PageSize= "4" >
<PagerSettings FirstPageText= "首页" LastPageText= "末页"
Mode= "NextPreviousFirstLast" NextPageText= "下一页"
PreviousPageText= "上一页" />
<Columns>
<asp:BoundField DataField= "menuID" HeaderText= "序号" InsertVisible= "False"
ReadOnly= "True" SortExpression= "menuID" />
<asp:BoundField DataField= "menuName" HeaderText= "菜名"
SortExpression= "menuName" />
<asp:ImageField DataImageUrlField= "menuPhoto" HeaderText= "图片"
ControlStyle-Height= "30px"
ControlStyle-Width= "70px"
SortExpression= "menuPhoto" >
<ControlStyle Height= "30px" Width= "70px" ></ControlStyle>
</asp:ImageField>
<asp:BoundField DataField= "menuCooker" HeaderText= "厨师"
SortExpression= "menuCooker" />
<asp:BoundField DataField= "menuStyle" HeaderText= "菜系"
SortExpression= "menuStyle" />
<asp:BoundField DataField= "menuPrice" HeaderText= "价格"
SortExpression= "menuPrice" />
<asp:BoundField DataField= "menuDate" HeaderText= "创菜日期"
SortExpression= "menuDate" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID= "SqlDataSource1" runat= "server"
ConnectionString= "<%$ ConnectionStrings:ConnStr %>"
SelectCommand="SELECT [menuID], [menuName], [menuPhoto], [menuCooker],
[menuStyle], [menuPrice], [menuDate] FROM [Menus]">
</asp:SqlDataSource>
</>
</form>
</asp:Content>
<asp:Content ID= "Content2" ContentPlaceHolderID= "ContentPlaceHolder2" Runat= "Server" >
< style= " height:300px " >
<asp:DataList ID= "DataList1" runat= "server" DataSourceID= "SqlDataSource2" >
<HeaderTemplate >
<table border= "1" style= "width: 104%; height: 36px" >
<tr>
<td>图片</td>
<td>菜名</td>
<td>原价格</td>
<td>优惠价格</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td style= "width: 90px" >
<asp:Image ID= "Image1" runat= "server" Height= "88px"
ImageUrl= '<%# Eval("menuPhoto") %>' Width= "88px" />
</td>
<td style= "width: 40px" >
<asp:Label ID= "Label1" runat= "server"
Text= '<%# Eval("menuName") %>' ></asp:Label>
</td>
<td style= "width: 50px" >
<asp:Label ID= "Label2" runat= "server"
Text= '<%# Eval("menuPrice") %>' ></asp:Label>
</td>
<td style= "width: 50px" >
<asp:Label ID= "Label3" runat= "server"
Text= '<%# Eval("menuNewPrice") %>' ></asp:Label>
</td>
</tr>
</ItemTemplate>
<FooterTemplate></table></FooterTemplate>
</asp:DataList>
<asp:SqlDataSource ID= "SqlDataSource2" runat= "server"
ConnectionString= "<%$ ConnectionStrings:ConnStr %>"
SelectCommand="SELECT [menuName], [menuPhoto],
[menuNewPrice], [menuPrice] FROM [Menus] WHERE ([menuNewPrice] IS NOT NULL)">
</asp:SqlDataSource>
</>
</asp:Content></pre><p>
</p>
<div style= " display:block; width:100%; padding-top:15px; margin:0px auto; height:90px; overflow:hidden; text-align:center;" ><script src= "/2011/ads/tech_content_end_468x60.js" ></script><script type= "text/javascript" ><!--
google_ad_client = "pub-5977682010997732" ;
/* 468x60, 09-9-9 */
google_ad_slot = "4048873275" ;
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type= "text/javascript" src= "http://pagead2.googlesyndication.com/pagead/show_ads.js" >
</script><ins style= "display:inline-table;border:none;height:60px;margin:0;padding:0;position:relative;visibility:visible;width:468px" ><ins id= "aswift_1_anchor" style= "display:block;border:none;height:60px;margin:0;padding:0;position:relative;visibility:visible;width:468px" ><iframe allowtransparency= "true" hspace= "0" marginwidth= "0" marginheight= "0" onload= "var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){i+='.call';setTimeout(h,0)}else if(h.match){i+='.nav';w.location.replace(h)}s.log&&s.log.push(i)}" vspace= "0" id= "aswift_1" name= "aswift_1" style= "left:0;position:absolute;top:0;" frameborder= "0" height= "60" scrolling= "no" width= "468" ></iframe></ins></ins>
</div>
|
发表回复