ASP.NET hidden field vs. invisible textbox

前端 未结 4 1075
野性不改
野性不改 2021-02-20 03:16

what are benefits of using a hidden field in ASP.NET when we can use another invisible element such as label or text box?

4条回答
  •  不知归路
    2021-02-20 04:07

    Either way works, for text box, don't use .visible="false" use

    yourTextBox.Style.Add("display", "none")
    

    or

    yourTextBox.Style.Add("visibility", "hidden")
    

提交回复
热议问题