How do you change the style of a div programmatically

后端 未结 8 2552
攒了一身酷
攒了一身酷 2021-02-20 06:56

How do I change the style (color) of a div such as the following?

\"
8条回答
  •  生来不讨喜
    2021-02-20 07:16

    If you wanted to change the class instead of the style directly: ie.. create another class with the styling you want...

    myDiv.Attributes["class"] = "otherClassName"
    

提交回复
热议问题