By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,295 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,295 IT Pros & Developers. It's quick & easy.

How to maintain the display state of a <div> element?

P: n/a
How to maintain the display state of a <divelement?

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

Is there a more straightforward approach? Thanks for any hints.

<a href="#" onclick="showhide('<%=divProdCat.ClientID %>')"
<div id="divProdCat" style="margin-top:5px;display:none;"
runat="server" >

Nov 2 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.