i want to get 'display' css value of a server side div!
the code below does not work :
if (div.Style["display"] == "none")
{
div.Style.Add("display", "table-row");
}
how can i get that value in c#?
thanks in advance
div.Attributes["style"].Add("display", "table-row")
Use this:
if (div.Attributes["style"].ToString().Contains("display:none;"))
{ div.Attributes.Add("style", "display:table-row"); }
or try
div.Attributes["CLASS"].ToString().Contains("CLASS_NAME")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With