Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MasterPage Issues

Posted on 2007-04-08
4
Medium Priority
?
705 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 1000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

704 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