Solved

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

Posted on 2004-08-19
3
2,517 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Access to class from any project within a solution. 6 24
Regex validation 2 25
How to open form using item in Listbox. 8 21
Complex SQL statement in VB.NET 7 16
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

832 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