473,387 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Question About Masterpages

Or more accurately putting content into a ContentPlaceHolder on a page which
has a MasterPageFile.

How do I put HTML content into a ContentPlaceHolder?
I have not HTML section or body section?

It seems fine for ASP controls, but what about HTML?

I must be doing something wrong, can anyone explain what?

Oct 6 '07 #1
2 1065
Just use an HtmlGeneric("div") or similar control, and populate it's
InnerHtTML property with your HTML.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com

"Paul W Smith" wrote:
Or more accurately putting content into a ContentPlaceHolder on a page which
has a MasterPageFile.

How do I put HTML content into a ContentPlaceHolder?
I have not HTML section or body section?

It seems fine for ASP controls, but what about HTML?

I must be doing something wrong, can anyone explain what?

Oct 6 '07 #2
"Paul W Smith" <pw*@NOSPAM.twelve.me.ukwrote in message
news:OC*************@TK2MSFTNGP06.phx.gbl...
>I want the page below to be inside a ContentPlaceHolder.
You place HTML in a ContentPlaceHolder just as you would place it anywhere
else...

However, the MasterPage provides the <html></html>, <header></headerand
<body></bodytags, so you can't include those...

Also, you can't include a server-side <formtag in a ContentPlaceHolder, so
remove that too...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 6 '07 #3

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

Similar topics

1
by: Roger Walter | last post by:
When using the MasterPages form Templating from ASP.NET web Controls, and also using another templating process that uses User Controls, I get a border around the entire page when it is rendered...
1
by: nLella | last post by:
I am trying to build a new web application and trying to implement either templates or master pages in it. I tried to read several articles but could not actually deside on weather to go with the...
2
by: clintonG | last post by:
Does anybody know how to use a control such as the DropDownList to change Themes when using MasterPages? I'm also asking in the forum. <%= Clinton Gallagher METROmilwaukee (sm) "A Regional...
6
by: Kenneth Keeley | last post by:
Hi, I have a Masterpage that controls the basic layout of the pages displayed on a web site. The masterpage also uses some variables. I would like to be able to access some of these variables from...
4
by: Jeff Lynch | last post by:
I need to call a class on every web page in a site. In ASP.NET 1.1 I would call this class before the Page_Load event in each web page's code-behind file since it needs to run before the web page...
3
by: Lars W. Andersen | last post by:
Hi, I am looking for a good - easy to comprehend little CMS application for my "beginners" asp.net 2.0 site. It must be able to use Access as the database (only a couple of people will be...
2
by: iturner100 | last post by:
Hi, I've been struggling with this one for a couple of hours without much joy. Basically, I've got a set of nested masterpages (3 as it happens). I'm dynamically generating a new page in code...
5
by: Nick Wouters | last post by:
Dear All In Classic ASP I used CSS for ALL layout. Now in ASP.NET version 2 I am testing out Masterpages as they come in very handy. It seems like it is replacing CSS for layout but what is...
6
by: =?Utf-8?B?U3RlcGhlbiBIYXRmaWVsZA==?= | last post by:
I have two masterpages in a web application. One is used for the login and logout pages. The other is used for all other pages in the application. The difference between the two masterpages is...
8
by: Mort Strom | last post by:
Right now the header of my master page contains all of the CSS styles for all of the pages that might be loaded in my ContentPlaceHolder. The problem is that my <styletag is getting too large to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.