T
Tatyana
Hello,
I was wondering if anybody knows how to get the values entered by the user
into the GridView Templated Field (both created dynamically) which is a
textbox.
Usually it could be
<asp:TextBox id="textbox1" OnTextChanged="TextBoxTextChanged" runat="server"
/>
and then
protected void TextBoxTextChanged(object sender, EventArgs e)
{TextBox txt_b = (TextBox)sender;
NewText = txt_b.Text;}
The reason that it didn't work is because we have multiple gridviews created
dynamically in code-behind, along with Templated Fields one of them is a
TextBox.
I'm trying to get entered by user data on the PostBack. But I either get the
same text pre-populated on gridviews creation (if I don't check on the
postback) or I'm getting a null for GridView (if I check on PostBack and do
not create all controls again on postback).
I was able to Add the OnTextChanged="TextBoxTextChanged" Attribute to the
TextBox. When text changes on submit button click event is not working.
Thank you,
Tatyana
I was wondering if anybody knows how to get the values entered by the user
into the GridView Templated Field (both created dynamically) which is a
textbox.
Usually it could be
<asp:TextBox id="textbox1" OnTextChanged="TextBoxTextChanged" runat="server"
/>
and then
protected void TextBoxTextChanged(object sender, EventArgs e)
{TextBox txt_b = (TextBox)sender;
NewText = txt_b.Text;}
The reason that it didn't work is because we have multiple gridviews created
dynamically in code-behind, along with Templated Fields one of them is a
TextBox.
I'm trying to get entered by user data on the PostBack. But I either get the
same text pre-populated on gridviews creation (if I don't check on the
postback) or I'm getting a null for GridView (if I check on PostBack and do
not create all controls again on postback).
I was able to Add the OnTextChanged="TextBoxTextChanged" Attribute to the
TextBox. When text changes on submit button click event is not working.
Thank you,
Tatyana