Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 23rd, 2007, 12:48 AM
Registered User
 
Join Date: Aug 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Scrollbars for ContentPlace Holder???

My problem is that I cannot work out how to make the masterpage Content Section's 'contentplaceholder' scrollable. In addition to this if I change the screen resolution or view in different browers everything gets stretched and/or misaligned.

Basically I want the left/right ad panels, banner and footer sections to remain static across the whole website and only the content section to change as each new page is loaded into it. However, if the content page has a lot of text/images etc I want that section to be scrollable, and only scrollable where there is an overflow on the content sections height. At the moment the content panel grows and pushes my footer off the bottom of the page.

I am opening the page from javascript window.open() method with no scrollbars. Because i need scrollbars only for ContentPlace holder not for entire browser. DIV tag is also not working.

Please help me in this regard.

 
Old August 23rd, 2007, 04:40 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
Default

sivavenu - to do what you want to do, you'd need to add a styled DIV element (adding overflow:auto etc) around any of your content sections. as it stands, the document structure WILL stretch to accomodate additional height, thus pushing the footer down the page. THis is standard behaviour and therefore, you'd need to 'break out' of this design as i suggest above (i.e. enclose the content pages within the DIV elements).

as a personal preference, i'd choose not to do that and instead, make use of tabs (using the MS Ajax library for example), to separate your content out into more accesible sub-components. i've done something along these lines in a site that i'm working on at present. the structure of this site would be unweildy if it were a traditional 'single page with scrollbar' view, so i've cut it into tabbed logical sections to allow for minimal scrolling within the content page.

you can review my efforts on one such page at:

http://www.originaltalent.com/andyward

btw - it's dummy data in the page at the moment, but you'll get the idea.

[edit] you could also try using a panel around the contentplaceholder in template.master. something along the lines of (you'll have to play around with it):

                        <asp:Panel ID="scrollingPanel" runat="server" Height="525px" Width="97%" ScrollBars="Vertical">
                            <asp:ContentPlaceHolder ID="MainContent" runat="server">
                            </asp:ContentPlaceHolder>
                        </asp:Panel>

jimi

http://www.jamestollan.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Place Holder Manoj Bisht ASP.NET 1.x and 2.0 Application Design 3 October 24th, 2007 08:52 AM
Accessing Holder<T> in JAX-WS is rocket science?!? ypomonh J2EE 0 July 17th, 2007 09:32 AM
Cleaning a Place Holder from a class see07 ASP.NET 1.x and 2.0 Application Design 4 March 15th, 2005 12:28 PM
How to know if a place holder is empty see07 ASP.NET 1.x and 2.0 Application Design 2 March 4th, 2005 04:43 PM
scrollbars=? larry Javascript How-To 2 August 28th, 2004 02:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.