HTML5 validation and ASP.net Webforms

前端 未结 2 506
逝去的感伤
逝去的感伤 2021-01-26 23:42

I\'m experimenting with HTML5 built-in validation attributes and the first difficulty I have run into is that the validation attributes work in a form context. I.E. if you want

2条回答
  •  梦谈多话
    2021-01-27 00:35

    Warning: The following solution isn't beautiful, I know. But it's the only solution I can think of. :/

    Create a form-tag side by side with the server-created form-tag. Position the client-side form on top of the page.

    Drawback: You cannot use server tags. But hey... who does now a days?! :)

    ... Everything ....
    ... Form with HTML5 validation ...
    ... Form with HTML5 validation ...

提交回复
热议问题