我正在使用它设置某些控件
divCorporateId.Style.Add("Visibility", "hidden");
我如何检查另一种方法中的值是什么?
我想是这样的:
if (divCorporateId.Style........ == "hidden")
{
do something
}
就像是:
if (divCorporateId.Style[HtmlTextWriterStyle.Visibility] == "hidden")
{
do something
}
You can get Css property value in C# like this
string value = divCorporateId.Style["Key"]
then you can apply your conditions based on this value.