I want to remove a side panel from a page

Topics: ASP.NET 2.0, Business Logic Layer, Controls, Themes
Sep 11, 2011 at 4:12 AM

What is the best way to remove a side panel and all the controls in it, so that my page content takes up all the space?

Sep 12, 2011 at 1:08 PM

If you want to hide something in a single page, do it in javascript.

Here is the code I put on a page to hide menu, title and other things.

http://www.portes.consultationdmsoft.com/

<script type="text/javascript">// <![CDATA[
document.getElementById('ctl00_cphBody_h1Title').className = 'hidden';
document.getElementById('menu4').className = 'hidden';
document.getElementById('coverflow').className = 'hidden';
document.getElementById('header').style.height = "90px";
var isIE6 = /*@cc_on/*@if(@_jscript_version<=5.6)1@else@*/0/*@end@*/;

if (isIE6) {
document.getElementById('container').style.marginLeft = "0px";
document.getElementById('container').style.marginTop = "-50px";
}
// ]]></script>

Sep 12, 2011 at 2:12 PM

With the Standard theme and this style, I was able to hide the side panel:

#content {
    float: left;
    width: 100%;
}

#sidepanel {
    float: right;
    width: 0%;
    visibility: hidden;
}

Or you can use a theme that has no side panel.

Sep 13, 2011 at 3:12 PM
desdubler wrote:

What is the best way to remove a side panel and all the controls in it, so that my page content takes up all the space?

See here:

http://blogengine.codeplex.com/discussions/49470

Oct 27, 2011 at 1:00 AM
Edited Oct 27, 2011 at 1:02 AM

You can also have code behind for the site.master  to hide or display it when needed.

Look at this post:

Separate page - example please?

 

Hope this helps,

Brian Davis


Java Blog