Ask a Question related to ASP.NET General, Design and Development.
-
Pedro Correia #1
HELP! Error Loading ASPX : Object Reference not set to an instance object
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
Pedro Correia Guest
-
Dynamically loading user control into Placeholder gives Object reference not set to an instance of an object
I've created user controls that contain listboxes that are dynamically populated from the database. In the html view of the user control... -
Custom Control Problem :: Object reference not set to an instance of an object
Hi All! I have the following Custom Control file... '########### WebUserControl1.ascx ############# <%@ Control Language="vb"... -
[WebMethod] System.NullReferenceException: Object reference not set to an instance of an object.
Um, this isn't going to work, generally. Web services, as any web app (especially on Windows server 2003) are heavily sandboxed. The method you... -
Mysterious Error: Object reference not set to an instance of an object
Hi There! I'm having a mysterious error right after I login using Forms Authentication in my ASP.NET app. Below is the error... Exception... -
Object reference not set to an instance of an object. .......... Error .... Please Help
Hi, I am facing a problem, and i don't know why the error is being generated. I am updating a datagrid with an XML file. My code is ...



Reply With Quote

