Eric Saboia Eric Saboia - 9 months ago 27
jQuery Question

How to get value of asp:Button with JavaScript

I don't understand very well how I get value of with JavaScript or JQuery?

I have this code:

<asp:Button ID="btnIdButton" runat="server" Text="Button"/>

In this case I need get value inside the button with id "btnIdButton". I tested some possibilites:


But it did not work.


You need to use "endsWith" selector like this:$("[id$=btnIdButton]")