Solved

MasterPage Issues

Posted on 2007-04-08
4
701 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

821 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