HTML5 email input cannot assign ID and RUNAT=“Server” ASP.NET 4

后端 未结 4 561
轻奢々
轻奢々 2020-11-30 13:39

Hi I am trying to assign an ID to an HTML5 input so that i can access its value from the code behind in the web form. However with the this code:

 

        
4条回答
  •  隐瞒了意图╮
    2020-11-30 14:20

    Use this code to use HTML5 input type:

    1. Use this in .aspx file:

      
      
    2. Use this in .cs file:

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

提交回复
热议问题