日期:2014-05-18 浏览次数:20373 次
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Weekly.aspx.cs" Inherits="Weekly" Title="Untitled Page" %> <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <script language="javascript" type="text/javascript"> <!-- function getClientId() { var paraId1 = '<%= TextBox1.ClientID %>';//注册控件 return {Id1:paraId1};//生成访问器 } //--> </script> <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CellPadding="1" ForeColor="#333333" GridLines="None" ShowFooter="True" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound" PageSize="5" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating"> <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" /> <Columns> <asp:TemplateField HeaderText="序号" SortExpression="序号"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("序号") %>'></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Label ID="Label2" runat="server" Text='<%# Bind("序号") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </asp:Content>