473,327 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Textbox values changed aren't appearing after update

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.

Jan 25 '07 #1
1 1468
Never mind. I got it. It was how I was handling my postback. It kept
reloading my data.

Maz.

On Jan 25, 4:34 pm, maflat...@gmail.com wrote:
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.
Jan 26 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Paul Slavin | last post by:
I have a textbox bound to a dataview, when I update the text in the textbox no changes take place in the underlying dataset. Why is this?? any answers appreciated, as to due to the underlying...
3
by: Nic | last post by:
Hey, I have an ASP-application. In the ASPX I have an <asp:dropdownlist ..>. Now when I leave this control I want to initialisize some other fields. In window forms we uses the onleave event but...
2
by: Alpha | last post by:
Hi, I have a window based program. One of the form has several textboxes and a datagrid. The textboxes are bind to the same dataset table as the datagrid and the text changes to reflect different...
6
by: Alex | last post by:
I am a newbie to ASP.NET... What I was trying to do... but yet to succeed in... I am building a customer info database... and on default, I want to display the customer's basic information in...
7
by: Peter D.C. | last post by:
Hi I want to update data hold in several textbox controls on an asp.net form. But it seems like it is the old textbox values that is "re-updates" through a stored procedure who updates a SQL...
4
by: Mark Broadbent | last post by:
This one has got me absolutely stumped. At work I have created a simple web form that gets data from a sql backend and puts this to a dataset. I have an edit button that when clicked will set...
6
by: kurt | last post by:
Hi all, I have something that has me stumped. I have a webform that has several text boxes. Each of these boxes has the textchanged set so when the user enters text and leaves the textbox, it...
6
by: JohnR | last post by:
I have a table with 1 row which is used to hold some application wide items (one item per field, hence I only need 1 row). I want to bind one of the fields to a textbox. After setting up the...
10
by: Neil | last post by:
Using the MS Rich Textbox Control 6.0 in Access 2000, I need to concatenate several RTB controls into a single RTF file. Sometimes two strings will be side-by-side; other times they need to be...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.