GridView 中放textbox 问题
我在GridView 里放了个textbox 控件并加了 ontextchanged="TextBox1_TextChanged"
接下来如何获取 textbox1 里的值呢?
代码:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="Table-00" Width="100%" CellSpacing="1"
DataKeyNames="Id" onrowcommand="GridView1_RowCommand"
onrowdatabound="GridView1_RowDataBound" CellPadding="4" ForeColor="#333333" GridLines="None"
>
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<Columns>
<asp:TemplateField HeaderText="选择">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="信息名称">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("titles") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="排序">
<ItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True" ontextchanged="TextBox1_TextChanged" text='<%#Eval("sort") %>'></asp:TextBox> </ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="删除操作">
<ItemTemplate>
<asp:ImageButton ID="ImageButton1" Width="15px" Height="15px" ImageUrl="../images/d.ico" CommandName="ImageButton1" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="修改/查看">
<ItemTemplate>
<asp:ImageButton ID="ImageButton2" CommandName="ImageButton2" Width="15px" Height="15px" ImageUrl="../images/u.ico" runat="server" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333&