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
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