M
msch-prv
How to maintain the display state of a <div> element?
Is there a simple way to maintain the display state of a <div>
element? On my page, a
div block can be hidden/shown by js function showhide(). I would like
to maintain the block's display state when the page is posted back.
I'm having difficulties to retrieve the div style attributes from the
viewstate: Me.divProdCat.Style.Item("display") always returns the same
attribute.
Is there a more straightforward approach? Thanks for any hints.
<div id="divProdCat" style="margin-top:5px;display:none;"
runat="server" >
....
</div>
Is there a simple way to maintain the display state of a <div>
element? On my page, a
div block can be hidden/shown by js function showhide(). I would like
to maintain the block's display state when the page is posted back.
I'm having difficulties to retrieve the div style attributes from the
viewstate: Me.divProdCat.Style.Item("display") always returns the same
attribute.
Is there a more straightforward approach? Thanks for any hints.
Categories</a>
<div id="divProdCat" style="margin-top:5px;display:none;"
runat="server" >
....
</div>