Unable to set div's Visible property to true
Hi guys,
I have the following markup
Code:
<div class="validation clear" runat="server" id="div_MyDiV" visible="false">
Some text
</div>
and code behind
Code:
div_MyDiV.Visible = true;
When I debug, the visible property is false, and after stepping over de line, it's still false?!?!
Any ideas?
Re: Unable to set div's Visible property to true
Try setting it in the PreRender page event and see if it helps - my guess is that your assignment of true is overwritten
Re: Unable to set div's Visible property to true
I've used this a dozen of times before, always in the page load.
Anyway, it wasn't visible because of some other reason. It works fine now. Only thing I don't understand is why the debugger always show that Visible=false.
Quote:
my guess is that your assignment of true is overwritten
I looked at it the first step after setting the Visible property to true. When would it be overwritten then?