ASP.NET GridView学习之五 单行编辑
作者 佚名技术
来源 NET编程
浏览
发布时间 2012-05-19
GridViewEdit.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="GridViewEditTest.aspx.cs" Inherits="GridViewEditTest" %> <!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:Panel ID="pnlEdit" runat="server" Height="50px" Width="684px" Visible="False"> 姓名:<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>地址:<asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>邮编<asp:TextBox ID="txtPostCode" runat="server"></asp:TextBox><asp:Button ID="btnOK" runat="server" Text="确定" OnClick="btnOK_Click" /> <asp:Button ID="btnCancel" runat="server" Text="取消" OnClick="btnCancel_Click" /></asp:Panel> <br /> <br /> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataKeyNames="CLientID" GridLines="Horizontal" OnPageIndexChanging="GridView1_PageIndexChanging" OnSelectedIndexChanging="GridView1_SelectedIndexChanging" AllowPaging="True"> <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" /> <Columns> <asp:CommandField ShowSelectButton="True" /> <asp:BoundField DataField="ClientName" HeaderText="姓名" SortExpression="ClientName" /> <asp:BoundField DataField="AddressStr" HeaderText="地址" SortExpression="AddressStr" /> <asp:BoundField DataField="PostCode" HeaderText="邮编" SortExpression="PostCode" /> </Columns> <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 |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于ASP.NET GridView学习之五 单行编辑的所有评论