Default3.aspx
资源名称:SunShine.rar [点击查看]
上传用户:tjxpgg
上传日期:2017-05-14
资源大小:2244k
文件大小:2k
源码类别:
SilverLight
开发平台:
ASP/ASPX
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" >
- <head runat="server">
- <title>无标题页</title>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None">
- <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
- <Columns>
- <asp:BoundField DataField="Title" HeaderText="书名" SortExpression="Title" />
- <asp:BoundField DataField="Author" HeaderText="作者" SortExpression="Author" />
- <asp:BoundField DataField="UnitPrice" HeaderText="售价" SortExpression="UnitPrice" />
- <asp:BoundField DataField="ContentDescription" HeaderText="简介" SortExpression="ContentDescription" />
- <asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" ReadOnly="True"
- SortExpression="Id" />
- </Columns>
- <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
- <EditRowStyle BackColor="#999999" />
- <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
- <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
- <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
- <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
- </asp:GridView>
- </div>
- <asp:SqlDataSource ID="SqlDataSource1" runat="server" CacheDuration="3600" ConnectionString="<%$ ConnectionStrings:MyBookShopConnectionString %>"
- EnableCaching="True" SelectCommand="SELECT [Title], [Author], [UnitPrice], [ContentDescription], [Id] FROM [Books]"
- SqlCacheDependency="mybookshop;books"></asp:SqlDataSource>
- </form>
- </body>
- </html>