Click here to Skip to main content
15,903,203 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Error is show-
The name 'lblbtcaount' does not exist in the current context

What I have tried:

if (ds2.Tables[0].Rows.Count > 0)
{
userid = Convert.ToString(ds2.Tables[0].Rows[0]["userid"]);
lblbtcaount.Text = Convert.ToString(ds2.Tables[0].Rows[0]["bitcoinval"]); // This line error show

imgpath = Convert.ToString("http://www.g.com/" + ds2.Tables[0].Rows[0]["macadd"]);
}
Posted
Updated 4-Dec-18 1:40am
v4
Comments
Vincent Maverick Durano 5-Dec-18 19:45pm    
Posting your HTML markup where your Label is rendered would further help us see what causes the issue.

1 solution

The error is pretty explicit:
The name 'lblbtcaount' does not exist in the current context
It means what it says: there is nothing in the current class or method called lblbtcaount - either you have the wrong class, the wrong spelling, or the wrong case: C# is case sensitive, so lblbtcaount is not the same as lblbtCaount.
But I'd guess that it's the spelling: did you mean lblbtcount instead?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900