Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asp:Label Display Error

Status
Not open for further replies.

CJAI

MIS
Oct 21, 2003
224
US
For some reason when I go to populate the text property of the <asp:Label> control I get the folllowing error:

code:
projectID.Text = "test"
<asp:Label ID="projectID" Runat="server" />

error:
Name 'projectID' is not declared.


Thanks all!

J
 
Is this (projectID.Text = "test") in a script block somewhere? I can't really tell by your post.
 
Its not declared as a label control in the codebehind page...

How do you do this??????

Thanks
 
fyi

The script is in a codebehind page
 
Do you have something in your class that looks similar to this?
protected System.Web.UI.WebControls.Label projectID;
If not, delete your label, add a new one and try rebuilding.
 
No, I do not have protected
System.Web.UI.WebControls.Label projectID;
in my class
 
Tried all of the above and still no luck :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top