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

P

Pedro Correia

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top