Urgent!Pls help me with getting data from the textbox template field in the gridview?
Can anyone help me with getting data from the textbox template field in the gridview?
Here is my code for the textbox template field in the gridview.
<asp:textbox runat="server" ID="QuantityTxtBox" />
After entering data into the textbox in the gridview, I try to get the data in the first row and display it into LABEL1 with the following code
Dim text As String
Dim tb As TextBox = CType(LecReqGV.Rows(0).FindControl("QuantityTextbox"), TextBox)
If Not (tb.Text.Equals("")) Then
text = tb.Text
Label1.Text = text
The code doesn’t work and the error message “Object reference not set to an instance of an object.” keeps prompting out. Can anyone help me with that?
QuantityTxtBox is spelt differently to QuantityTextbox
By kenn_rosie in forum .NET
Last Post: 03-02-2006, 04:29 PM
By clean in forum ASP.NET
Last Post: 02-15-2006, 09:14 AM
By Bob in forum VB Classic
Last Post: 06-27-2001, 01:15 PM
By Marat Musaev in forum XML
Last Post: 11-02-2000, 09:54 AM
By Aaron Longnion in forum authorevents.mitchell
Last Post: 10-16-2000, 08:15 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL