Skip to content
Advertisement

How to change the text of a label?

I have a radiobutton list and on click on the radio button item I have to change the text of its label. But for some reason it’s not working. Code is below:

JavaScript

Advertisement

Answer

ASP.Net automatically generates unique client IDs for server-side controls.

Change it to

JavaScript

In ASP.Net 4.0, you could also set the ClientIDMode property to Static instead.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement