Questions tagged [contentplaceholder]

a ASP.NET control that defines a relative region for content in a master page, and renders all text, markup, and server controls from a related Content control found in a content page.

A ContentPlaceHolder control defines a relative region for content in a master page, and renders all text, markup, and server controls from a related Content control found in a content page.

A Content control is associated with a ContentPlaceHolder using its ContentPlaceHolderID property. Set the ContentPlaceHolderID property to the value of the ID property of the related ContentPlaceHolder control in a master page. More than one ContentPlaceHolder can be declared in a master page.

Within a content page, only one Content control can supply the content for a ContentPlaceHolder in the master page. However, in each content page that uses a master page, you can have separate Content controls associated with the ContentPlaceHolder. For example, you can define the ContentPlaceHolder for the page title in a master page. For each content page that uses the master page, you can add a Content control that supplies the text and markup for the page title.

143 questions
22
votes
4 answers

Using iFrames In ASP.NET

I have an asp.net website with a master-page, can I use the iframe so my .aspx pages will load inside the iframes. (Meaning it wont load the master-page) Kinda like my iframe will be the contentplaceholder or maybe the contentplaceholder will be…
Or Betzalel
  • 2,427
  • 11
  • 47
  • 70
10
votes
5 answers

ContentPlaceHolders: Repeated Content

Scenario I have an application using asp.net Master Pages in which I would like to repeat some content at the top and bottom of a page. Currently i use something like this: Master Page
brad
  • 73,826
  • 21
  • 73
  • 85
8
votes
1 answer

Accessing Grandparent Content Placeholder in Master Pages

I've been searching the web and not finding any answers (there were a couple close questions on stack overflow but they didn't seem to get answered or be identical), so I thought I'd pose one of my own. It revolves around nested master pages and a…
Terry
  • 2,148
  • 2
  • 32
  • 53
7
votes
4 answers

How to programmatically add stuff to contentPlaceHolder?

I have a master page and all of my pages are inheriting it. For formatting, I thought to place the content that differs from one page to another in a ContentPlaceHolder. Now, how can I insert everything into that? Since I am planning to populate the…
Ciprian Tomoiagă
  • 3,773
  • 4
  • 41
  • 65
6
votes
1 answer

ASP.NET - Update panel in Master page, refresh button in Content Page

I have Update panel in Master page: Košík [
John
  • 135
  • 2
  • 4
  • 12
6
votes
2 answers

Nested MVC master pages

I'm, using MVC to develop a Web application, and I need to use nested MasterPages in my site, in order to share the Visual Components. I have two Master Pages and a ContentPage: Parent.master Child.master Content.aspx I want to reference a…
Daniel Peñalba
  • 30,507
  • 32
  • 137
  • 219
5
votes
2 answers

Can a ContentPlaceHolder be placed in a Web User Control?

I want to do something like this: I got this User Control called Base:
some content...
Then i inherit the Base in another User Control and…
The Demz
  • 7,066
  • 5
  • 39
  • 43
5
votes
1 answer

Sitecore 8: Automatically fill a placeholder by a default rendering

I was playing around with dynamic placeholders and was struck by a prefilling concept.Is there a way to select a default rendering for one of my placeholders which would avoid the "select rendering" dialog in experience editor ?? Scenario: I have a…