CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 2/3/2008 10:14:22 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 6 Views: 34 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
7 Items, 1 Pages 1 |< << Go >> >|
slprince
Asp.Net User
Ajax, MasterPage, and dynamic content2/3/2008 10:14:22 PM

0/0

Hi,

I am extending one of the starter kits with VS2008 and 3.5 .net and I am running into a vexing problem.   Whenever I have a gridview that displays X number of rows it will get displayed over the footer.  Meaning that the master page does not stretch out to accomodate the bigger volume of rows in the gridview.  If I put the gridview in a table cell <td> with a real big height like 1200px then the surrounding master page stretches out.  How do I get the master page to "stretch" to fit the dynamic content of the gridview?  I really dont want to have a td with a giant height.  Any help or advice is greatly appreciated!  Thanks in advance.

slp Big Smile

DotNetAdvisor
Asp.Net User
Re: Ajax, MasterPage, and dynamic content2/4/2008 3:35:40 AM

0/0

I haven't looked deeply at the starter kits but I'm guessing that the reason it is displaying over the footer is because the gridview is contained in an element that is either set to float or is positioned absolutely.  If it's floating then the solution is pretty easy.  You could set the footer's style to "clear: both;".  If it's positioned absolutely then it will be a lot more difficult.  Let's check for floating first.


Rob Mills

www.dotnetadvisor.com
Amanda Wang - M
Asp.Net User
Re: Ajax, MasterPage, and dynamic content2/6/2008 2:23:56 AM

0/0

Hi,

slprince:
Meaning that the master page does not stretch out to accomodate the bigger volume of rows in the gridview.  If I put the gridview in a table cell <td> with a real big height like 1200px then the surrounding master page stretches out.  How do I get the master page to "stretch" to fit the dynamic content of the gridview? 

In fact, the contentplaceholder that is in the master page defines a region of the master page rendering that can be substituted with content from a page associated to the master, and its size can stretch according to the content page's size.

If you put the contentplaceholder in a div or td, please do not set the div or td's absolute size, or else the contentplaseholder cannot stretched according to the content page's size.

 

Hope it helps.


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
flohaas
Asp.Net User
Re: Ajax, MasterPage, and dynamic content2/6/2008 7:49:19 AM

0/0

I think this will be useful to u

http://dflorence25.blogspot.com/2008/02/master-pages-in-aspnet-20.html


Cheers
Florence
slprince
Asp.Net User
Re: Ajax, MasterPage, and dynamic content2/8/2008 5:47:28 AM

0/0

Amanda,

Thank you for the reply.  I had to come up with a home grown solution, if you will.  I had to do it thru javascript.  Basically when the dynamic gridview loads I extend the height out of the div columns with the following javascript call:

function AdjustColumnsHeightForDynamicContent()
        {
            if(document.getElementById('<%=hdnBool.ClientID%>').value ==0)
            {
                // get a reference to the three DIVS that make up the columns
                var centerCol = window.document.getElementById('centercol');
                var leftCol = window.document.getElementById('leftcol');
                var rightCol = window.document.getElementById('rightcol');
                // calculate the max height
                var hCenterCol = centerCol.offsetHeight;
                var hLeftCol = leftCol.offsetHeight;
                var hRightCol = rightCol.offsetHeight;
                var maxHeight = Math.max(hCenterCol, Math.max(hLeftCol, hRightCol));
                // set the height of all 3 DIVS to the max height
                centerCol.style.height = (maxHeight + eval(document.getElementById('<%=txtHidden.ClientID%>').value)) + 'px';
                leftCol.style.height = (maxHeight + eval(document.getElementById('<%=txtHidden.ClientID%>').value)) + 'px';
                rightCol.style.height = (maxHeight + eval(document.getElementById('<%=txtHidden.ClientID%>').value)) + 'px';          
                // Show the footer
                window.document.getElementById('footer').style.visibility = 'inherit';
                document.getElementById('<%=hdnBool.ClientID%>').value = 1;
            }
        }

slprince
Asp.Net User
Re: Ajax, MasterPage, and dynamic content2/8/2008 5:48:36 AM

0/0

Thank you for the suggestion.  I tried that and it did not work for my particular situation.  See my solution in the reply to Amanda. 

blahhumbug
Asp.Net User
Re: Ajax, MasterPage, and dynamic content2/19/2008 11:41:06 AM

0/0

 Just a quick comment. This overlapping is probably related to CSS. If you add  

overflow: auto
  to the style of the tag containing the gridview, you'll probably fix the error without having to resort to javascript.

I'd be interesting in hearing if it works.

 

Good luck,

Sam 

7 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP. Net 3. 5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008
Learning ASP.NET 3.5 Authors: Jesse Liberty, Dan Hurwitz, Brian MacDonald, Pages: 576, Published: 2008
Beginning XML with DOM and Ajax: From Novice to Professional Authors: Sas Jacobs, Pages: 432, Published: 2006

Web:
Ajax, MasterPage, and dynamic content - ASP.NET Forums How do I get the master page to "stretch" to fit the dynamic content of the gridview? I really dont want to have a td with a giant height. ...
MasterPage with dynamic content? - ASP.NET Forums I was thinking of creating two Content panels, one being for my header and dynamically telling the masterpage what goes in the content panel ...
CodeProject: Really Dynamic Master Pages. Free source code and ... NET AJAX and not master pages. You probably need to add some sections to your .... General, Dynamic Masterpage Content, member, Paul Molloy, 7:02 2 Apr '07 ...
Everything ASP.NET 2.0 - Ajax, MasterPages, Enterprise Library ... The Ajax client library scripts contains 2 event handler called Sys.WebForms. ... eggheadcafe.com : Dynamic Display of Uploaded Content in MasterPages ...
RadTabStrip/RadMultipage/Masterpages entanglement - telerik Forum NET RadTabStrip/RadMultipage/Masterpages entanglement ... Guidance for dynamic content in RadMultiPage in asp:content controls with Ajax. ...
DotNetFreaks : Master Pages - Asp.Net Tutorial, Script, Controls, code NET 2.0 AJAX 1.0 Extensions and Master Pages, Reviews: 0 Rating: ... way to manage the layout of your Web site without duplicating content on every page. ...
Ajax.Asp.Net Tips and Tricks: Adding Dynamic Controls to ... Ajax.Asp.Net Tips and Tricks: Adding Dynamic Controls to UpdatePanel and ... I am also using a masterpage. When I access the Request[ScriptManager1. ...
DotNetSlackers: Passing Information Between Content and Master Pages Jan 31, 2007 ... NET AJAX support. Nearly codeless development. ... Master Pages and Content Pages in WSS 3.0 more ... NET 2.0 more; Master Pages in ASP. ...
How to Use Master Pages in Visual Studio and C# Master Pages allow you to create definitive styles for your web pages, and they have ... This is where dynamic content will be displayed on the Master Page. ...
Introducing ASP 2.0 Master Pages Sep 9, 2005 ... For example, you can generate dynamic content using server controls or database .... AJAX World Expo - Scott Guthrie Announces Silverlight 2 ...




Search This Site:










log in controls and customers database

post back to previous page....help..!

how to extract sqlcommand from enterprise library dbcommand object

unable to get started with dnn

vs2005 and problems running/debugging asp.net when on network drive.

vs 2008 documentation

callbacks in whidbey!

could not load type '_default'.

interesting tools

validate ok button in editior zone

two dropdown lists again

help: asnet session setup

role-based authentication

need help on how to get a dnn db that works on web to work local without all menus going to the orginal url

need code to create rich text box that expands to fit it's contents

access denied launching word

fitting 5 mods in content pane.

default button issue

font settings

null profile.username ?

net.mail attachements

skins

rename splitter container, panels lost and everything in them!

microsoft.webdeployment.targets(311,24)

publish wizard

changing the sql server passwords programmatically !

latest nightly?

large project with multiple subweb projects

dum question of the day!

master page sharing

 
All Times Are GMT