Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
heyy..

I am using a textbox and a button tag ...when I use html 5 validation (required) ..it is not working ...in IE ..

here is my code :-


XML
<asp:TextBox runat="server" ID="txtVehicleCode"   MaxLength="6" placeholder="Vehicle Code" required pattern=".*[^\s].*"></asp:TextBox>
       <button id="BodyContent_btnCmbCancel" type="submit" class="button cancel" runat="server"   onserverclick="Button1_Click">Cancel</button>




Problem is when I clicked the button, textbox is not validate and the event occure...

I cannot change the button tag (because of css). Is there is any other way ..?
Posted

1 solution

Could be that IE is running in compatibility mode in which case it emulates IE7 which does not support HTML5 validation. Try in another browser such as Chrome or Firefox to see if the same behaviour is experienced. If this turns out to be the case you can adjust the compatibility view settings for IE (Take note of the "Display intranet sites in Compatibility View" setting)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900