Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > HELP! Error Loading ASPX : Object Reference not set to an instance object

Reply
Thread Tools

HELP! Error Loading ASPX : Object Reference not set to an instance object

 
 
Pedro Correia
Guest
Posts: n/a
 
      07-25-2003
Hello,

When i run my aspx i get this weird error:

System.NullReferenceException: Object reference not set to an instance
of an object.
at emp.PAGTRF.InitializeComponent()
at emp.PAGTRF.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Page.ProcessRequestMain()

On my localhost it works fine and it only fails in the production
server.

here it is the code of the initializecomponent in the code-behind
class:


private void InitializeComponent()
{

this.lkb_continuar.Click += new
EventHandler(this.lkb_continuar_Click);
this.txtContinuar.Click += new EventHandler(this.lkb_continuar_Click);
base.Load += new EventHandler(this.Page_Load);
this.ucContas1.DropConta.SelectedIndexChanged += new
EventHandler(this.DropConta_ListChanged);
this.ddlDesc.SelectedIndexChanged += new
EventHandler(this.ddlDesc_ListChanged);

}

all my controls are defined in my page with runat="server". And
this.ucContas1.DropConta is defined as follows in a user control:

public DropDownList DropConta
{
get {return ddlConta;}
set {ddlConta = value;}
}

by the way ddlconta is a control (drop down list ) defined in my user
control which works fine because it's being used in other pages.

is there anyone with any idea about this one?

thanks in advance

Pedro Correia
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Object reference not set to an instance of an object" Weird thing happens with reference a link nguyentrongkha@gmail.com ASP .Net 1 09-20-2007 09:46 PM
Dynamically loading user control into Placeholder gives Object reference not set to an instance of an object Phoenix ASP .Net Building Controls 2 06-06-2005 04:02 PM
Error:Object reference not set to an instance of an object. Suresh Kojhani ASP .Net 1 07-29-2004 12:10 PM
Error !Object reference not set to an instance of an object. !!! Help Parthiv Joshi ASP .Net 2 07-02-2004 10:28 AM
"Object reference not set to an instance of an object" error Lauchlan M ASP .Net 1 08-18-2003 01:32 PM



Advertisments