I'm creating a form validation. i have these buttons with on my .cshtml. When the user clicks it, a css class (selected) will be added on it.
<button type="button" ID="btn_100" runat="server" class="selected">100</button>
<button type="button" ID="btn_200" runat="server">200</button>
....
<button type="button" ID="btn_600" runat="server">600</button>
Once the user submits the form, it will be validated and if it fails, it should keep the button class in it or simply keep the button state.
What i'm thinking is to target the button from code behind using its value. Is there a similar like jQuery selector in asp.net that this?
$('button[value="100"]");
Or have a dynamic button variable, like this
btn_(value_selected).Attribute.Add("class","selected");
Any suggestion? TIA!