.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Object reference not set to an instance of an object.

Posted By: parthiban     Posted Date: December 05, 2012    Points:5   Category :ASP.Net
i get this error when i compile the code below:

int termsid = Convert.ToInt32(gvterms.DataKeys[e.RowIndex].Values["termsId"].ToString());

Responses
Author: Baimey Rajesh             
Posted Date: December 05, 2012     Points: 20   

Please check this link
http://www.codepal.co.uk/show/GridView_DataKeys_Object_Reference_Not_Set_error

Author: Baimey Rajesh             
Posted Date: December 05, 2012     Points: 20   

You can check :: GridView.DataKeys().Values are Case-Sensitive!
Please see if termsId is in the correct case

Thanks
Baimey



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend