|
-
August 10th, 2010, 10:31 AM
#1
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?
-
August 11th, 2010, 04:31 AM
#2
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
-
August 11th, 2010, 05:57 AM
#3
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.
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|