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

后端 未结 4 566
轻奢々
轻奢々 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:25

    If you are using vb.net :

    In .aspx page

       
    

    Avoid type="email/date/mob" in input tag, it may produce parse error

    In .vb page, in PageLoad()

       myTextBox.Attributes.Add("type","email")
    

提交回复
热议问题