Solved

System.NullReferenceException: Object reference not set to an instance of an object.

Posted on 2004-08-19
3
2,515 Views
Last Modified: 2012-06-27
Server Error in '/dotNetAlumni' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 28:     Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 29:         'Put user code to initialize the page here
Line 30:         lblTitle.InnerHtml = Application("Institution") & " Alumni Portal"
Line 31:         lblInstitution.Text = Application("Institution")
Line 32:
 

Source File: c:\inetpub\wwwroot\dotNetAlumni\default.aspx.vb    Line: 30

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   dotNetAlumni._default.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\dotNetAlumni\default.aspx.vb:30
   System.Web.UI.Control.OnLoad(EventArgs e)
   System.Web.UI.Control.LoadRecursive()
   System.Web.UI.Page.ProcessRequestMain()

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
0
Comment
Question by:smetterd
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
Sandeepk1999 earned 500 total points
ID: 11846100
Can you post the source code?

Looks like lblTitle is a HTML object and not a server object.

0
 
LVL 2

Author Comment

by:smetterd
ID: 11846464
Added runat="server" on that control and voila. Thanks Sandeepk
0
 
LVL 2

Author Comment

by:smetterd
ID: 11846501
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now