HTML5 Types in ASP.NET -
site exclusively used on mobile devices. fields requiring numeric input, want bring numeric keypad. can using html input element type set 'tel'. want add asp:requiredfieldvalidator field , based on msdn, need set input runat server. when this, "'tel' not valid type input tag." if remove runat = server, "unable find control id 'contract' referenced 'controltovalidate' property of ''"
<input type="tel" runat="server" id="contract"></input> <asp:requiredfieldvalidator runat="server" controltovalidate="contract" validationgroup="ifonrent" text="*" errormessage="contract required"></asp:requiredfieldvalidator> am out of luck , have code own validations?
you may want leave "type" undeclared in code "front". can set in code behind (maybe in page_init or page_load):
this.contract.attributes.add("type", "tel");
Comments
Post a Comment