Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object reference not set to an instance of an object
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Object reference not set to an instance of an object
Divers
Thread ID:
01407724
Message ID:
01407724
Vues:
101
I have a label on a usercontrol. I created a Caption property:
public string Caption
{
    get { return _Caption; }
    set 
    { 
        _Caption = value;
        lblCaption.Text = _Caption;
    }
}
On the line where the text of the label is being set I'm getting 'Object reference not set to an instance of an object'.
If I put my mouse over the 'lblCaption' part I see 'lblCaption null'. Anyone know what's up?

The calling code is:
Header HeaderName = new Header();
HeaderName.Caption = "Name"; ;
HeaderName.Width = 100;
HeaderName.Key = "name";
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform