Site will exclusively be used on mobile devices. So for fields requiring only numeric input, I want to bring up the numeric keypad. I can successfully do this by using an html input element with the type set to tel
. I want to add an asp:RequiredFieldValidator
to this field and based on MSDN.
I need to set the input to runat="server"
. When I do this, I get this error;
tel
is not a valid type for an input tag.
If I remove the runat="server"
, I get
Unable to find control id
Contract
referenced by theControlToValidate
property of''
Here is my code:
<input type="tel" runat="server" id="Contract"></input>
<asp:RequiredFieldValidator runat="server" ControlToValidate="Contract"
ValidationGroup="IfOnRent" Text="*"
ErrorMessage="Contract Required">
</asp:RequiredFieldValidator>
Am I just out of luck and have to code my own validations?