cannot set text attribute of asp.net button in jquery -


I'm having trouble here, I can get ' text of the asp.net button Using ' val () ' in JQuery, but could not set 'text' in any way. I've tried ' attr ', ' prop ', ' val () ', ' text () 'And' html () 'Please help.

JavaScript

  $ ("# & lt;% = hiddenButton.ClientID%>"). Attr ('text', 'hello'); Var sh = $ ("# & lt;% = hidden button. ClientID%>"). Val (); Warning (s);  

ASPX

  & lt; Asp: button id = "hidden button" runat = "server" onclick = "hidden button" text = "northeast celebration" />  

The warning box still shows "Northeast Celebration".

My HTML is inside a content placeholder, which is inside a form tag.

To set the value to you instead of setting the attribute, .val () Need to use:

  $ ("# & lt;% = hiddenButton.ClientID%>"). Val ('hello');  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -