Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

For some reason, even though I have div's set in CSS with "display: inline-block;", when trying to get the the display attribute in codebehind (c#), it shows null. Any ideas?

$
0
0

I can't for the life of me figure out what is going on here.  I have verified that the Css in my code works switching off display to none and it works, but for some reason, trying to get the display status in C# code behind shows null. I do this all the time, never have a problem, but am brain dead for some reason here so please help.

If I set the display in code behind right before getting its status, it shows correct, but not setting it with CSS.

However, if I set the display attribute with the "Style" property in the tag, it does work and is picked up in code behind.

Any ideas?

<div id="test1" class="asterisk">

.asterisk
{   display: inline-block;
    clear: right;
    float: right;	
    width: 100%;
    -webkit-appearance: none;
}

codebehind

if (null != test1.Style["display"])...

It shows null. in the above even though it is set in CSS to be inline-block;



Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>