Solved

MasterPage Issues

Posted on 2007-04-08
4
702 Views
Last Modified: 2013-11-26
I'm a newbie at VS2005 ASP.NET development and am trying to build a website using the new MasterPage feature that will provide for three frames; header, navigation, content. In the old days I would create a FrameSet page and then maniplulate the contents of each frame in code.

Not sure how to do that in the new MasterPage feature buit I suspect that it has something to do with a ContentPlaceHolder. The problem I'm having is that I cannot arrange the ContentPlaceHolders to effect of a narrow header at the top, a narrow navigation panel to th left and a large content panel taking the rest of the page.

When I drop a ContentPlaceHolder on the MaserPage it simply shows up and I cannot move or size it at all.

Not sure what I'm doing wrong and would sure appreciate any guidance.

Thank you, stullhe104
0
Comment
Question by:stullhe104
  • 2
4 Comments
 
LVL 26

Expert Comment

by:Rejojohny
ID: 18874197
no need of frames.. the code in the master page woild have code as you would normally write while creating tables with the similar layout as u have mentioned above .. just change the width of the cells to the widths that you would like .. the contenplaceholder will take the complete space of the cell where it is placed .. no need to resize it in the master page

Rejo
0
 
LVL 6

Accepted Solution

by:
sankar_ravi earned 250 total points
ID: 18874855
Hi, May be try something like this...

<%@ master language="C#" %>
<script runat="server" language="c#">

</script>

<html>
<head id="Head1" runat="server">
    <title>Master Page</title>
</head>
<body>
    <form id="Form1" runat="server">
        <table id="header" style="WIDTH: 100%; HEIGHT: 80px" cellspacing="1" cellpadding="1" border="1">
            <tr>
                <td width="100%" style="TEXT-ALIGN: center">
                    This is the header from the Master Page
                </td>
            </tr>
        </table>
        <b/>
         <table id="leftNav" style="WIDTH: 108px; HEIGHT: 100%" cellspacing="1" cellpadding="1" border="1">
            <tr>
                <td style="WIDTH: 100px"> Left Navigation
                </td>
            </tr>
            </table>                                
        <table id="mainBody" style="LEFT: 120px; VERTICAL-ALIGN: top; WIDTH: 848px; POSITION: absolute; TOP: 94px; HEIGHT: 100%" border="1">
            <tr>
                <td width="100%" style="VERTICAL-ALIGN: top">                
                    <asp:contentplaceholder id="middleContent" runat="Server"></asp:contentplaceholder>                
                </td>
            </tr>
        </table>
    </form>
</body>
</html>

Thanks.

0
 

Author Comment

by:stullhe104
ID: 18875168
Thanks for the coding example Ravi. It helped a lot and I seem to be on-track now.
Stullhe104
0
 
LVL 6

Expert Comment

by:sankar_ravi
ID: 18880422
I am glad that it helped you.
Thanks.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question