c# - ASP.net Webforms HTML5 "required" not working -
i quite new asp.net, trying use html5 required
attribute on textbox.
<form action="/../.." method="post" style="margin-bottom: 20px;" id="testform"> <input type="text" name="username" required="required"> <input type="submit" class="btn btn-primary" value="sign in" name="submit"/> </form>
when submit form without filling textbox data, doesnt show error message:
when inspect form, see class has been added required
, no error message shows:
the same code works fine in jsfiddle, check out here
Comments
Post a Comment