Change CSS classes from code

后端 未结 7 844
误落风尘
误落风尘 2020-12-03 06:17

It\'s easy to set CssClass in the code-behind, but this runs the risk of overwriting existing classes.

I need to set certain elements to ReadOnly

相关标签:
7条回答
  • 2020-12-03 07:09

    Can you make your own custom classes? Derive from the ASP.NET Button and add a propert for Read only. Somewhere...probably in the OnPreRender, you can check the new property and set (or not set) the CSSClass property accordingly.

    0 讨论(0)
提交回复
热议问题