Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old March 2nd, 2011, 12:09 AM
Registered User
Join Date: Feb 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing gridview row value to textbox


i have an error in passing gridview value to textbox can you please help me what is an error..please


<asp:Button ID="AcctView" runat="server" CommandArgument='<%# Container.DisplayIndex %>'
Text="Select" CommandName="View" />
<asp:Button ID="AcctView" runat="server" CommandArgument='<%# Container.DisplayIndex %>'
Text="Select" CommandName="View" />

if (e.CommandName.Equals("View"))

int index = Convert.ToInt32(e.CommandArgument.ToString());
GridViewRow gvRow = GLDataView.Rows[index];
TextBox tbActualOrder = (TextBox)gvRow.FindControl("txtChartAccount");
txtNewChartAccount.Text = Convert.ToString(tbActualOrder.Text); error : Object reference not set to an instance of an object.


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get value from TextBox in GridView MonkeyMan666 ASP.NET 3.5 Basics 1 February 26th, 2010 04:35 AM
Copy One Row from Gridview to Gridview lvprasad2007 ASP.NET 2.0 Professional 0 July 28th, 2009 09:29 AM
GridView Textbox Limno .NET Framework 1.x 0 May 28th, 2008 03:35 PM
Gridview with only one row mallikalapati ASP.NET 2.0 Professional 5 March 5th, 2008 09:27 AM
Gridview with only one row mallikalapati ASP.NET 2.0 Professional 0 February 25th, 2008 06:46 AM

All times are GMT -4. The time now is 02:18 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.