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

后端 未结 6 2162
囚心锁ツ
囚心锁ツ 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条回答
  •  余生分开走
    2020-12-02 00:04

    in your .aspx file add

    
    

    in your Code Behind .cs

    myTextBox.Attributes["type"] = "email";
    

    This Worked For Me

提交回复
热议问题