Reputation: 26376
How can i get the text of LinkButton in .NET using javascript?
Tried .innerHTMl, .innerText, .value...all not working....
Upvotes: 6
Views: 10932
Reputation: 685
for server side control use ClientID.
document.getElementById('<%= lnk1.ClientID %>').innerText
works for asp.net server side controls.
Upvotes: 2
Reputation: 7632
document.getElementById('lnk1').innerText
this should solve your problem, i tried it now and it works.
can you show me your code.
Upvotes: 5