.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

Null Reference Ex

Posted By: Aamrapali Tamgadge     Posted Date: January 13, 2011    Points:2   Category :ASP.Net
Hii. I hv hose My website on server but in home page i hv to tesimonial also..but it is displying following exception..
what shoud i do.ple anyone can suggest me..its argent

[NullReferenceException: Object reference not set to an instance of an object.]
BaseDB.ExecuteScalar(DbCommand dbCommand) +91
_Default.ShowTestimonial() +34
_Default.Page_Load(Object sender, EventArgs e) +32
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Responses
Author: Amit Mehra             
Posted Date: January 25, 2011     Points: 5   

HI,

Please check the returned value from ExecuteScaler() class....It seems there is no value returned by ExecuteScaler() and you are using this object somewhere without checking it value.

Thanks,
Amit
Please "Mark As Answer " if this post help you.


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