INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Resize ContentPlaceHolder at NestedMaster Page..

Resize ContentPlaceHolder at NestedMaster Page..

(OP)
Dear All,

In my project i have a master page where i have one content placeholder named as maincontent and i have used this in my nested master page , the main content placeholder is out of my nestedmasterpage size at the left and right side.how i do resize the maincontent place holder in nestedmaterpage as same with size with nestedmasterpage.

CODE --> c#

%@ Master Language="C#" MasterPageFile="~/MainSite.Master" AutoEventWireup="true" CodeBehind="AboutSubMaster.Master.cs" Inherits="YtleSolution.AboutSubMaster" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content> 


i have tried to use div which gives error[validatation xhtml5 control is not supported outside script or asp:content region]

how to i do resize content-placeholder in nested masted page?

Looking for your valuable reply..


Regards,
Mk..

RE: Resize ContentPlaceHolder at NestedMaster Page..

You will have to do it client side. I had to do this in a project and used JQuery to get the size of the container I wanted, AFTER the page is done loading. Then I added the height to the div I needed to the be the same height.

RE: Resize ContentPlaceHolder at NestedMaster Page..

(OP)
Dear Jbenson001,

Thanks a lot for your reply.i understand it .but would be grateful to you if you provide the sample code which really help me to understand more.

looking forward your valuable reply.

Regards,
Mk

RE: Resize ContentPlaceHolder at NestedMaster Page..

Something like this:

CODE

<script type="text/javascript">
        $(window).load(function () {
            //Need to wait for the whole window to load to get the correct height
            //Set the left sidebar height to the full height of the main content.
            var divHeight = $("#mainContent").outerHeight(true);
            $("#theDivToResize").css("height", divHeight);
        })
    </script> 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close