> Hello.
>
[quoted text clipped - 9 lines]
>
> Thanks for any help or information.
Thanks, but is DIV the best way to position my ContentPlaceHolder in
my master page.
It does not appear to be positioning my child content pages in same
location:
<div id= "DivContent" class="DivContent" >
<asp:ContentPlaceHolder ID="Content1" runat="server" >
</asp:ContentPlaceHolder>
</div>
.. css file
.DivContent
{
position:absolute;
left:105px;
width:700px;
height:600px;
top:220px;
background-color: rgb(246,246,246);
overflow: auto;
}
.. child page: (the master page shows up, but the changepassword
control appears to be in the upper left. outside the
contentplaceholder.
%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/Main/
MasterPage.master"
CodeFile="ChangePassword.aspx.vb" Inherits="Service_test" %>
<<asp:Content ID="Content1" ContentPlaceHolderID="Content1"
runat="Server">
<asp:ChangePassword ID="ChangePassword1" runat="server">
</asp:ChangePassword>
</asp:Content>
nahid - 14 Jul 2007 05:31 GMT
> Thanks, but is DIV the best way to position my ContentPlaceHolder in
> my master page.
[quoted text clipped - 33 lines]
> </asp:ChangePassword>
> </asp:Content>
hi,
i'm try this way
in master page
<form id="form1" runat="server" >
<div class="DivContent ">
<asp:contentplaceholder id="ContentPlaceHolder1"
runat="server">
</asp:contentplaceholder>
</div>
</form>
and in child page
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default"
Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">
<div style="text-align:center">
<asp:ChangePassword ID="ChangePassword1" runat="server">
</asp:ChangePassword>
</div>
</asp:Content>
..css
.DivContent
{
position:absolute;
left:105px;
width:700px;
height:600px;
top:220px;
background-color: rgb(246,246,246);
overflow: auto;
}
both style are working fine to me
nahid
http://nahidulkibria.blogspot.com/
http://www.kaz.com.bd
Alan Silver - 17 Jul 2007 10:14 GMT
>Thanks, but is DIV the best way to position my ContentPlaceHolder in my
>master page.
Yes, positioning should always be done with CSS, and divs are the
logical way to do that, unless the content in question has a natural
block element around it (such as a <ul> for example, you can position
this directly and so don't need to wrap it in a div).
>It does not appear to be positioning my child content pages in same
>location:
This sounds like a CSS problem, not one to do with ASP.NET or master
pages. I suspect you will be making work for yourself by trying to
tackle this problem from within VS.
Try saving the generated source of the page (File->Save in your
browser), and tinker around with the (X)HTML and CSS until you get it
working. Then copy the changes back into the master page and CSS file.
FWIW, I always design, test and debug (X)HTML and CSS in plain text
files from a text editor, I never do this from VS. I work with sample
content, or content generated from a real ASP.NET page, but saved from
the browser. That way you are concentrating on the real issue at hand.
HTH

Signature
Alan Silver
(anything added below this line is nothing to do with me)