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

Discussion in 'ASP .Net' started by Pedro Correia, Jul 25, 2003.

  1. 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, Jul 25, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Parthiv Joshi
    Replies:
    2
    Views:
    695
    Kalyan
    Jul 2, 2004
  2. Suresh Kojhani
    Replies:
    1
    Views:
    2,388
    Anushi
    Jul 29, 2004
  3. Lauchlan M
    Replies:
    1
    Views:
    2,367
    S. Justin Gengo
    Aug 18, 2003
  4. Replies:
    1
    Views:
    482
    Mark Rae [MVP]
    Sep 20, 2007
  5. Phoenix
    Replies:
    2
    Views:
    241
    Teemu Keiski
    Jun 6, 2005
Loading...

Share This Page