Hi there,
I need to update a number contained within a textbox in my gridview using TextBox1_TextChanged sytax
I have tried this code, but I have this error
CS0103: The name 'TextBox1' does not exist in the current context
Thanks in advance for any help you can provide.
<asp:TemplateField HeaderText="Nr."
ItemStyle-CssClass="ddl_Class_new"
ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:TextBox ID="TextBox1"
runat="server"
AutoPostBack="true"
CssClass="ddl_Class_new"
BackColor="Yellow"
Text='<%#(Eval("n").ToString())%>'
OnTextChanged="TextBox1_TextChanged"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
int stocked = Convert.ToInt32(TextBox1.Text);
}