Solved

MasterPage Issues

Posted on 2007-04-08
4
703 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

739 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