C# Error in <%= MyLabl.ClientId %>

Hello,
im right now in the middle on converting myself from VB.Net To C# (Since my company decided that from now on they will only use C# for new projects)

And after a many dead ends, i have somehow managed to learn a thing or two.. But now i have come with this error and i have no ideia how to proced now..

i have in the html something like this:

<script>
document.getElementById("<%=MyLabel.ClientId%)").value='lala'
</script>

But when i try to run it give me this error:
CS0117: 'System.Web.UI.WebControls.Label' doesnt have a definition for  'ClientId'
(the error message was in another language so i somehow translated it to english)

Now.. how can i write the object client id for javascript use ?
kkqbalmAsked:
Who is Participating?
 
drichardsCommented:
It's ClientID, not ClientId.  Capitalization matters.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.