Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 17th, 2007, 02:05 PM
Authorized User
 
Join Date: Jan 2007
Location: , , United Kingdom.
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problems with locating Content PlaceHolders

I'm new to asp.net and am having trouble position the content placeholder in the location that I want it to be, I can't seem to find any guidance of how this is done text book. AT present I have used the same technigue inside the book.

on my stylesheet I have
#content
{
    margin-left: 230px;
    padding: 0 10px 1.8em 20px;
    background-color: #fff;
}
html>body #content {
    width: 218px;
}



.centreContent {
    padding-bottom: 1.8em;
}

an on the masterpage

 <div id ="content">
        <div class="centrecontent">
            <h2><asp:Label ID="titlePage" runat="server" Text="Home"></asp:Label></h2>
             <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
            </asp:contentplaceholder>
            </div>


            <div id="addressroute" style="float:right">
                    <asp:SiteMapPath ID="SiteMapPath1" runat="server">
                    </asp:SiteMapPath>
            </div>
        </div>

Could someone please advise what I need to do to position the place holder where I want it

Reply With Quote
  #2 (permalink)  
Old January 17th, 2007, 02:53 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Nichola,

Don't bother trying to position the content placeholder. It renders no markup in the page, so there *is* nothing to position.

Instead, put the ContentPlaceHolder inside an element that can be positioned, like a <div> tag.

Hope this helps,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
  #3 (permalink)  
Old January 17th, 2007, 03:36 PM
Authorized User
 
Join Date: Jan 2007
Location: , , United Kingdom.
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for you help but I managed to get the class way working.

Reply With Quote
  #4 (permalink)  
Old January 17th, 2007, 03:41 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Right, but that means that you positioned the outer centrecontent <div> either as .centrecontent or #centrecontent, not the actual ContentPlaceHolder, right? (Although, as a side effect, that one is positioned as well).

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BOF locating. Bronte Access VBA 5 March 4th, 2008 08:55 AM
FilterExpression multiple parameters/placeholders NigelBronson ASP.NET 2.0 Basics 0 September 27th, 2006 04:57 PM
MySQL Parameter Placeholders bluewavestrider ASP.NET 2.0 Basics 0 July 28th, 2006 11:29 AM
Locating n measuring component in an image RichardRose C# 0 October 8th, 2003 04:07 AM



All times are GMT -4. The time now is 08:42 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.