I'm trying to use the HTML 5 button element to submit an ASP.NET form. I also want it to not trigger validation when clicked. This will submit the form, but will still cause validation to trigger:
<button runat="server"
CausesValidation="false"
type="submit"
name="myButton"
id="myButton">Press Here</button>
I'm specifically trying to not use HTML input or ASP:Button elements. They both will work, but don't allow HTML (images etc..) within the button text.
An example validation element on my page:
<asp:RequiredFieldValidator
ValidationGroup="myValGroup"
ControlToValidate="phone"
ID="phoneRequiredVal"
runat="server"
ErrorMessage="Phone is required."
Display="Dynamic"
CssClass="defaultErrorText"></asp:RequiredFieldValidator>
Any ideas?