How can I use HTML5 email input type with server-side .NET

后端 未结 6 2154
囚心锁ツ
囚心锁ツ 2020-12-01 23:42

As I understand it, the element in HTML5 will render as a simple text field in browsers that do not support the tag. On other browsers

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 00:05

    Sorry I'm a bit late to the party, though I think that others can benefit from what I did. I have a page which is HTML 5 though we still have .NET 3.5. We wanted to keep the .NET element, though have the type change to email. I've tried several methods (including Milox above) to no avail, though the one which worked for me was the following: I added a JavaScript property to the element itself inline (when I put it in a script tag it wouldn't pick up for some reason...) Here is what your tag would look like if you use my changes:

    Eli

提交回复
热议问题