how to remove 'name' attribute from server controls?

前端 未结 6 2112
别那么骄傲
别那么骄傲 2020-11-29 11:19

The following asp.net side code of control:


6条回答
  •  时光说笑
    2020-11-29 12:19

    what ASP.Net controls render in name attributes, comes from UniqueID property. It's not necessarily good idea to override it, since ASP.NET uses that to locate control on postback to route postback data & events. However, if you are sure it is ok in your scenario, you certainly can override UniqueID property following @Pauli Østerø's answer. Have fun!

提交回复
热议问题