473,775 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ContentPlaceHol der under a DIV tag - Visual Studio Design view?

Hello.

I have a master page with ContentPlaceHol der under a html Div tag.
That DIV tag has CSS that positions it.

While in Visual Studio design view, that div tag and contentplace
holder does not appear where it actually shows up when you run it the
code.

Is DIV the best way to go? How else can I do this? ContentPlaceHol der
does not appear to all for a style setting.

Thanks for any help or information.

Jul 12 '07 #1
3 14968
On Jul 12, 10:21 pm, jobs <j...@webdos.co mwrote:
Hello.

I have a master page with ContentPlaceHol der under a html Div tag.
That DIV tag has CSS that positions it.

While in Visual Studio design view, that div tag and contentplace
holder does not appear where it actually shows up when you run it the
code.

Is DIV the best way to go? How else can I do this? ContentPlaceHol der
does not appear to all for a style setting.

Thanks for any help or information.
hi,
don't worry vs not suport design time of masterpage
check it
http://aspnet.4guysfromrolla.com/articles/010505-1.aspx

some copy paste from this article
Implement the needed HTML on each and every page on our site
Pros: Visual Studio .NET will provide a rich, WYSIWYG design-time
experience for each page.
Cons: If we want to change the look and feel of the site, we need to
edit every single page!
Implement the layout using a "top" and "bottom" User Control, which
will be added to each page
Pros: Altering the site's layout only involves changing at most two
files - the top and bottom User Controls.
Cons: Have to manually add the top and bottom User Controls to all
pages; no WYSIWYG support.
Utilize MasterPages support in ASP.NET 1.x
Pros: Can easily change the site layout by editing just the
MasterPage; allows for a more fluid layout than kludging together top
and bottom User Controls.
Cons: No WYSIWYG design-time support in VS.NET.

nahid
http://nahidulkibria.blogspot.com/
http://www.kaz.com.bd

Jul 12 '07 #2
Thanks, but is DIV the best way to position my ContentPlaceHol der in
my master page.

It does not appear to be positioning my child content pages in same
location:

<div id= "DivContent " class="DivConte nt" >
<asp:ContentPla ceHolder ID="Content1" runat="server" >
</asp:ContentPlac eHolder>
</div>

... css file

..DivContent
{
position:absolu te;
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
contentplacehol der.
%@ Page Language="VB" AutoEventWireup ="false" MasterPageFile= "~/Main/
MasterPage.mast er"
CodeFile="Chang ePassword.aspx. vb" Inherits="Servi ce_test" %>
<<asp:Content ID="Content1" ContentPlaceHol derID="Content1 "
runat="Server">
<asp:ChangePass word ID="ChangePassw ord1" runat="server">
</asp:ChangePassw ord>
</asp:Content>
Jul 12 '07 #3
In article <11************ **********@22g2 000hsm.googlegr oups.com>, jobs
<jo**@webdos.co mwrites
>Thanks, but is DIV the best way to position my ContentPlaceHol der 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 <ulfor 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

--
Alan Silver
(anything added below this line is nothing to do with me)
Jul 17 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1417
by: Dica | last post by:
this is related to an earlier question i had. i'm trying to figure out visual studio 2003 and c#. i started a simple app to try to learn the basics and used many of the wizards to set up things like my database connection strings, etc. once i had the basic form set up, i went to hand edit the code, made a few revisions, and then went back to design view. my hand written revisions stay the way i've written them just fine until i use design...
3
2376
by: Billy Cormic | last post by:
Hello, I am using Visual Studio 2005 Beta for the first time and am having trouble using contentplaceholders. Actually, I am having trouble declaring them. Here is a snap shot of my master page: <%@ master language="C#" %> <html> <head id="Head1" runat="server"> <title>Untitled Page</title>
4
1790
by: Steve Richter | last post by:
using visual studio 2003 for my asp.net projects ... Once I undock the property window to get a better look at things, I cant dock it back where it came from. Can someone tell me how to redock the property window? When I copy HTML snippets from another page the code behind class is not automatically updated with the new controls. For example, the Web Controls are not added to the group of stmts at the start of the page class which...
4
3937
by: Nathan Sokalski | last post by:
When editing an ASP Table, Visual Studio does not allow me to edit it in Design View. This makes it harder to add elements, because I must add every element either by using Design View to create the element outside of the table and then using cut & paste in HTML View to move it to the desired location, or by manually typing the code in using HTML View. The first technique sometimes does not automatically update the list of elements...
4
1754
by: anton.hopen | last post by:
ASP.NET 2.0 master pages are great. However, I want to edit an ASPX page in FrontPage for aesthetic styling reasons. The ASPX page is linked to a master page so it naturally has a contentplaceholder ID. Right-click in VS2005 and open it in MS FrontPage. Source appears file. However, design view (the real reason I'm in FP anyway) will not display unless I remove the ContentPlaceHolder tag. Specifically: <asp:Content ID="Content1"...
11
2349
by: Rolf Welskes | last post by:
Hello, the problem seems to be complex and is in all developments of web-controls which uses own TypeConverter. For this I have here a simple demo-program of the problem: The Control-code: A class MyString which is a class which is similar to a string public class MyString {
3
1208
by: =?Utf-8?B?TWlrZQ==?= | last post by:
Visual Studio 2003 constantly changes HTML on my webform - For the worse! I've experienced this before, but now its really causing problems because it wrecks the page. How do I prevent VS from modifying my HTML? Specifically its changing an <objectwithin my page. Thanks.
2
2193
by: =?Utf-8?B?Um9iZXJ0IFNtaXRo?= | last post by:
Hi, I have just installed visual studio 2005 professional edition (evaluation version). However it will not allow me to view webforms in a website project in design view. I can just see the HTML and the code behind, but no graphical design view, which is pretty fundamental for development. I have .net framework 2.0 service pack 1 installed. When I click on view designer it appears to be locked, although there is no message. This happens on...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9915
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8939
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5358
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4014
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2852
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.