<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Client Side Web Development</title><link>http://forums.asp.net/130.aspx</link><description>Client-side programming discussions, including CSS, DHTML, JScript/Javascript, etc. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=18&amp;c=16" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Show/Hide divs</title><link>http://forums.asp.net/thread/3289987.aspx</link><pubDate>Mon, 13 Jul 2009 12:07:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3289987</guid><dc:creator>NC01</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3289987.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3289987</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;viral sarvaiya:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;function minusPlus(div,imgControl){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var el = document.getElementById(div);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( el.style.display == &amp;quot;none&amp;quot; ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.style.display = &amp;#39;&amp;#39;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imgControl.src=&amp;quot;images/minus.gif&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.style.display = &amp;#39;none&amp;#39;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imgControl.src=&amp;quot;images/plus.gif&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;in the html part &lt;/p&gt;
&lt;p&gt;&amp;lt;img src=&amp;quot;images/minus.gif&amp;quot; onclick=&amp;quot;minusPlus(&amp;#39;Tr1&amp;#39;,this);&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt;here the Tr1 is the id of the &amp;lt;div&amp;gt;&lt;/p&gt;
&lt;p&gt;may be this will help full to you.....&lt;br /&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt; &lt;/p&gt;
&lt;p&gt;How could that help if the page does a PostBack, which is what his initial problem was? As soon as the page does a PostBack, everything will return to the way it was before the changes were made.&lt;/p&gt;
&lt;p&gt;NC...&lt;/p&gt;</description></item><item><title>Re: Show/Hide divs</title><link>http://forums.asp.net/thread/3287411.aspx</link><pubDate>Sat, 11 Jul 2009 11:27:20 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3287411</guid><dc:creator>viral sarvaiya</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3287411.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3287411</wfw:commentRss><description>&lt;p&gt;function minusPlus(div,imgControl){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var el = document.getElementById(div);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( el.style.display == &amp;quot;none&amp;quot; ) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.style.display = &amp;#39;&amp;#39;;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imgControl.src=&amp;quot;images/minus.gif&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; el.style.display = &amp;#39;none&amp;#39;;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; imgControl.src=&amp;quot;images/plus.gif&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;in the html part &lt;/p&gt;&lt;p&gt;&amp;lt;img src=&amp;quot;images/minus.gif&amp;quot; onclick=&amp;quot;minusPlus(&amp;#39;Tr1&amp;#39;,this);&amp;quot;/&amp;gt;&lt;/p&gt;&lt;p&gt;here the Tr1 is the id of the &amp;lt;div&amp;gt;&lt;/p&gt;&lt;p&gt;may be this will help full to you.....&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Show/Hide divs</title><link>http://forums.asp.net/thread/3286075.aspx</link><pubDate>Fri, 10 Jul 2009 13:38:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3286075</guid><dc:creator>NC01</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3286075.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3286075</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;Noorstudio:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;
&lt;p&gt;&lt;b&gt;For those who maybe interested on the solution of my question.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Firstly: thanks to NC for his assisted idea.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b&gt;The solution is:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;1.&amp;nbsp; I have a hidden label on my webform where I store the ID of the clicked item.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;2. &amp;nbsp;I have style=display:none as the default settings. See below markup code:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;div&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;id&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;My_GV_Div&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;server&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;style&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;display:none&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;3. I have a client-side script that runs on pageload.&amp;nbsp; The script will take the ID found on the hidden label and do the expand as shown in the script below.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;script&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;type&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p dir="ltr"&gt;window.onload = function (){&lt;/p&gt;
&lt;p dir="ltr"&gt;&amp;nbsp; if (document.getElementById(&amp;#39;IDDiv&amp;#39;).innerHTML != &amp;#39;none&amp;#39;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
&lt;p dir="ltr"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(document.getElementById(&amp;#39;IDDiv&amp;#39;).innerHTML).style.display = &amp;#39;block&amp;#39;;&lt;/p&gt;
&lt;p dir="ltr"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }}&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;script&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;That&amp;#39;s it. I hope this helps.&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Exactly. Not sure that window.onload = function will work in all browsers however.&lt;/p&gt;
&lt;p&gt;NC...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;</description></item><item><title>Re: Show/Hide divs</title><link>http://forums.asp.net/thread/3276372.aspx</link><pubDate>Mon, 06 Jul 2009 09:11:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3276372</guid><dc:creator>Noorstudio</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3276372.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3276372</wfw:commentRss><description>&lt;p&gt;&lt;b&gt;For those who maybe interested on the solution of my question.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Firstly: thanks to NC for his assisted idea.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b&gt;The solution is:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;1.&amp;nbsp; I have a hidden label on my webform where I store the ID of the clicked item.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;2. &amp;nbsp;I have style=display:none as the default settings. See below markup code:&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;div&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;id&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;My_GV_Div&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;server&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;style&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;display:none&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;3. I have a client-side script that runs on pageload.&amp;nbsp; The script will take the ID found on the hidden label and do the expand as shown in the script below.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;script&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;type&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p dir="ltr"&gt;window.onload = function (){&lt;/p&gt;
&lt;p dir="ltr"&gt;&amp;nbsp; if (document.getElementById(&amp;#39;IDDiv&amp;#39;).innerHTML != &amp;#39;none&amp;#39;)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/p&gt;
&lt;p dir="ltr"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(document.getElementById(&amp;#39;IDDiv&amp;#39;).innerHTML).style.display = &amp;#39;block&amp;#39;;&lt;/p&gt;
&lt;p dir="ltr"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }}&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;script&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;That&amp;#39;s it. I hope this helps.&lt;/p&gt;</description></item><item><title>Re: Show/Hide divs</title><link>http://forums.asp.net/thread/3274325.aspx</link><pubDate>Sat, 04 Jul 2009 06:21:36 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3274325</guid><dc:creator>Noorstudio</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3274325.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3274325</wfw:commentRss><description>&lt;p&gt;Hello NC&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I was thinking of your code.&amp;nbsp; Do you mean that you want me to run a client-side javascript code at &lt;strong&gt;pageload&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;I think this is the only solution that I can do!&lt;/p&gt;</description></item><item><title>Re: Show/Hide divs</title><link>http://forums.asp.net/thread/3273657.aspx</link><pubDate>Fri, 03 Jul 2009 14:16:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273657</guid><dc:creator>Noorstudio</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273657.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3273657</wfw:commentRss><description>&lt;p&gt;Hello NC&amp;nbsp;&lt;br /&gt;What you are telling me is to make a type of communication state, right?&amp;nbsp; I have already tried that in a similar way found in 2nd approach which dose the same result.&amp;nbsp; The problem is: At postback trip to the server, I can NOT play with any other DIVs other than the selected index (div).&amp;nbsp; For example: if I want to play with two DIVs at one time (&amp;nbsp;expanding current&amp;nbsp;index DIV and expanding another one by giving its ID)&amp;nbsp;, then i would not be able to expand the other one by giving its ID. You know why? Because, I am only retrieving data for the GridView only. That is, the ItemDataBound and ItemCreated of DataList are not called.&amp;nbsp; And since they are not called, I am not able to play with other DIVs.&amp;nbsp;&amp;nbsp; &lt;br /&gt;So, the idea is NOT only passing the state of the DIVs.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Re: Show/Hide divs</title><link>http://forums.asp.net/thread/3269014.aspx</link><pubDate>Wed, 01 Jul 2009 13:30:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3269014</guid><dc:creator>NC01</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3269014.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3269014</wfw:commentRss><description>&lt;p&gt;Add a hidden control for each div to store whether it is hidden or showing.&lt;/p&gt;
&lt;p&gt;&amp;lt;input type=&amp;quot;hidden&amp;quot; id=&amp;quot;divStateHidden&amp;quot; name=&amp;quot;divStateHidden&amp;quot; value=&amp;quot;&amp;quot; runat=&amp;quot;server&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt;Server-side:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hide:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; divStateHidden.Value = &amp;quot;none&amp;quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Show:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; divStateHidden.Value = &amp;quot;block&amp;quot;;&lt;/p&gt;
&lt;p&gt;Client-side:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&amp;#39;&amp;lt;%= divStateHidden.ClientID %&amp;gt;&amp;#39;).value = &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&amp;#39;&amp;lt;%= yourDiv.ClientID %&amp;gt;&amp;#39;).style.display;&lt;/p&gt;
&lt;p&gt;NC...&lt;/p&gt;</description></item><item><title>Show/Hide divs</title><link>http://forums.asp.net/thread/3268104.aspx</link><pubDate>Wed, 01 Jul 2009 06:52:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3268104</guid><dc:creator>Noorstudio</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3268104.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3268104</wfw:commentRss><description>&lt;p&gt;&lt;span style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:Verdana;"&gt;Hello.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:Verdana;"&gt;I have a DataList as (PARENT) and a GridView as (CHILD)l.&amp;nbsp;The user should see only &lt;strong&gt;ONE&lt;/strong&gt; expanded division of &lt;strong&gt;CHILD&lt;/strong&gt; data at a time. So, I&amp;nbsp; have placed the GridView between &amp;lt;div&amp;gt;&amp;lt;/div&amp;gt; tag to be toggled ON/OFF. &amp;nbsp;That is, I have to&amp;nbsp;collapse&amp;nbsp;any expanded division in order to show new one.&amp;nbsp; The&amp;nbsp;DataList has&amp;nbsp;a button to Expand or Collapse the display.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:Verdana;"&gt;The displayed DataList items will NOT be reloaded from server upon child data display.&amp;nbsp; Only the child data will be retrieved from db for display. &amp;nbsp;Retrieving only child data makes me have no &lt;strong&gt;access&lt;/strong&gt; to test all displayed DataList items to collapse the previous displayed division (e.i using a loop such as &lt;strong&gt;For Each DL_item In DataList1.Items&lt;/strong&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:Verdana;"&gt;I have used two approaches, none of them worked!!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:Verdana;"&gt;&lt;u&gt;&lt;strong&gt;1&lt;sup&gt;st&lt;/sup&gt; approach. Server-side &amp;amp; Client side coding:&lt;/strong&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:Verdana;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;I am using the following server-side coding to show a hidden division. This is done via SelectedIndexChanged.&lt;/span&gt;&lt;/p&gt;&lt;pre class="vb.net" name="code"&gt;       &amp;#39;In selected item, find the division and expand it.
      div = DataList1.Items(DataList1.SelectedIndex).FindControl(&amp;quot;GVDiv&amp;quot;)
      div.Style.Item(&amp;quot;DISPLAY&amp;quot;) = &amp;quot;block&amp;quot;
&lt;/pre&gt;
&lt;p&gt;And, in a loop, I&amp;#39;m using the following client-side script to collapse all shown division. &amp;nbsp;Note that a client-side coding will take care of expanding the needed division.&lt;/p&gt;&lt;pre class="xhtml" name="code"&gt;document.getElementById(DivName).style.display = &amp;#39;none&amp;#39;;&lt;/pre&gt;&lt;pre class="xhtml" name="code"&gt;&amp;nbsp;&lt;/pre&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:Verdana;"&gt;The problem is: Server-side coding does NOT see new changes that the previous division was collapsed!! &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:Verdana;"&gt;So, how to make sever-side coding to see that all divisions were collapsed by client-side script?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:Verdana;"&gt;&lt;u&gt;&lt;strong&gt;2nd approach. Only Server-side coding:&lt;/strong&gt;&lt;/u&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:Verdana;"&gt;I have stored the ID of the expanded division in a hidden label and then used that ID for collapsing the div. &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="FONT-SIZE:9pt;COLOR:black;FONT-FAMILY:Verdana;mso-fareast-font-family:&amp;#39;Times New Roman&amp;#39;;mso-bidi-font-family:&amp;#39;Times New Roman&amp;#39;;mso-ansi-language:EN-US;mso-fareast-language:EN-US;mso-bidi-language:AR-SA;"&gt;This code via SelectedIndexChanged.&lt;/span&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="vb.net" name="code"&gt;Dim oBtnExpnd As Button
        Dim oExp As Button
        Dim div As HtmlGenericControl

        oBtnExpnd = DataList1.Items(DataList1.SelectedIndex).FindControl(&amp;quot;btnExpand&amp;quot;)
        oExp = DataList1.Items(DataList1.SelectedIndex).FindControl(&amp;quot;btnExpand&amp;quot;)
        div = DataList1.Items(DataList1.SelectedIndex).FindControl(&amp;quot;My_GV_Div&amp;quot;)

        If oExp.Text = &amp;quot;+&amp;quot; And div.Style.Item(&amp;quot;DISPLAY&amp;quot;) = &amp;quot;none&amp;quot; Then
            div.Style.Item(&amp;quot;DISPLAY&amp;quot;) = &amp;quot;block&amp;quot;   &amp;#39;displaying div is working fine to display child data.
            ShowDetails(strConnection)            &amp;#39;display child data at selected division. 
            Dim StoredDivID As New Label            
             StoredDivID = CType(Me.FindControl(&amp;quot;IDDiv&amp;quot;), Label)   &amp;#39;find IDDiv label.
            If (StoredDivID.Text &amp;lt;&amp;gt; &amp;quot;none&amp;quot;) Then     &amp;#39;default ID of hidden label is none.
                Dim NewDiv As New HtmlGenericControl(&amp;quot;div&amp;quot;)   &amp;#39;create new division
                NewDiv.ID = StoredDivID.Text  &amp;#39;new created DIV will have ID of previous expanded division.
                NewDiv.Style.Item(&amp;quot;DISPLAY&amp;quot;) = &amp;quot;none&amp;quot;    &amp;#39;hide previous div.  (== did NOT work!!)
                StoredDivID.Text = div.ClientID          &amp;#39;store selected divsion ID into hidden label.
            Else
                StoredDivID.Text = div.ClientID          &amp;#39;store selected divsion ID into hidden label.
            End If
            oBtnExpnd.Text = &amp;quot;-&amp;quot;
        ElseIf oExp.Text = &amp;quot;-&amp;quot; And div.Style.Item(&amp;quot;DISPLAY&amp;quot;) = &amp;quot;block&amp;quot; Then
            div.Style.Item(&amp;quot;DISPLAY&amp;quot;) = &amp;quot;none&amp;quot;           &amp;#39;works fine sicne I am at the same seleced index.
            oBtnExpnd.Text = &amp;quot;+&amp;quot;
        End If
&lt;/pre&gt;
&lt;p&gt;Any ideas how I can correct the problem?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks &lt;/p&gt;</description></item></channel></rss>