打印本文 打印本文 关闭窗口 关闭窗口
asp.net 2.0中一次性更新所有GRIDVIEW的记录
作者:武汉SEO闵涛  文章来源:敏韬网  点击数2337  更新时间:2009/4/23 10:45:19  文章录入:mintao  责任编辑:mintao
t>

 

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

    <title>Untitled Page</title>

</head>

<body>

    <form id="form1" runat="server">

    <div>

        <asp:GridView ID="GridView1" Runat="server" DataKeyNames="CustomerID"

            AutoGenerateColumns="False">

            <Columns>

                <asp:TemplateField SortExpression="CustomerID" HeaderText="CustomerID">

                <ItemTemplate>

                    <asp:TextBox Runat="server" Text=''''<%# Bind("CustomerID") %>'''' ID="TextBox1"></asp:TextBox>

                </ItemTemplate>

                </asp:TemplateField>

                <asp:TemplateField SortExpression="CompanyName" HeaderText="CompanyName">

                    <ItemTemplate>

                        <asp:TextBox Runat="server" Text=''''<%# Bind("CompanyName") %>'''' ID="TextBox2"></asp:TextBox>

                    </ItemTemplate>

                </asp:TemplateField>

                <asp:TemplateField SortExpression="ContactName" HeaderText="ContactTitle">

                    <ItemTemplate>

                        <asp:TextBox Runat="server" Text=''''<%# Bind("ContactTitle") %>'''' ID="TextBox3"></asp:TextBox>

                    </ItemTemplate>

                </asp:TemplateField>

            </Columns>

        </asp:GridView>

      

        <asp:Button ID="Button1" Runat="server" Text="Button" OnClick="Button1_Click" />&nbsp;

   

    </div>

    </form>

</body>

</html>



上一页  [1] [2] [3] 

打印本文 打印本文 关闭窗口 关闭窗口