Textbox values changed aren't appearing after update

M

maflatoun

ey guys,

I'm using ASP.NET 2.0 GridView for the first time. I have the following
setup

On the .aspx side I have this in my GridView

<asp:TemplateField HeaderText="New">

<ItemTemplate>

<%# Eval("New")%>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="tbxNew"
runat="server" Text='<%# Eval("New")%>'></asp:TextBox>
</EditItemTemplate>

</asp:TemplateField>

and when I .cs side I have this

protected void gvLicenseSplit_RowUpdating(object sender,
GridViewUpdateEventArgs e)
{
GridViewRow row = gvLicenseSplit.Rows[e.RowIndex];

TextBox t = (TextBox)row.FindControl("tbxNew");

Response.Write("The Text Entered is" + t.Text);
}

The value of tbxNew is always empty. Could someone please help me with
this?

Thanks
M.
 
M

maflatoun

Never mind. I got it. It was how I was handling my postback. It kept
reloading my data.

Maz.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top