ListBooksByCategory.aspx
资源名称:SunShine.rar [点击查看]
上传用户:tjxpgg
上传日期:2017-05-14
资源大小:2244k
文件大小:3k
源码类别:
SilverLight
开发平台:
ASP/ASPX
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="ListBooksByCategory.aspx.cs" Inherits="ListBooksByCategory" %>
- <!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>
- <script language="javascript">
- function fun(obj)
- {
- var length=document.getElementsByTagName("input").length;
- for(var i=0;i<length;i++)
- {
- if(document.getElementsByTagName("input")[i].type=="checkbox")
- {
- document.getElementsByTagName("input")[i].checked=obj.checked;
- }
- }
- }
- </script>
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="852px" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal" OnRowDataBound="GridView1_RowDataBound" ShowFooter="True" PageIndex="1">
- <Columns>
- <asp:TemplateField>
- <EditItemTemplate>
- <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
- </EditItemTemplate>
- <HeaderTemplate>
- <input id="Checkbox1" type="checkbox" onclick="fun(this)"/>全选
- </HeaderTemplate>
- <ItemTemplate>
- <asp:CheckBox ID="CheckBox2" runat="server" />
- </ItemTemplate>
- </asp:TemplateField>
- <asp:BoundField HeaderText="书名" DataField="title" />
- <asp:BoundField HeaderText="作者" DataField="author" />
- <asp:BoundField HeaderText="类别" DataField="name" />
- <asp:BoundField DataField="id" HeaderText="编号" />
- </Columns>
- <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
- <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
- <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
- <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
- <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
- <AlternatingRowStyle BackColor="#F7F7F7" />
- </asp:GridView>
- <br />
- 将书归入:<asp:DropDownList ID="DropDownList1" runat="server">
- </asp:DropDownList> <asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
- Text="修改" /></div>
- </form>
- </body>
- </html>