contentplaceholder

Conditional ContentPlaceHolder in Master Page

I have two master pages in my project, one for web views and another for emails. In the web master page is a placeholder to put page specific JavaScript, if a page is using this and I try to programmatically change the masterpage to send as an email the server falls over as it can't find the placeholder. Is there a way to change the beh...

Getting contents of ContentPlaceHolder within C#

I've got a Master Page with multiple ContentPlaceHolders. One of them will sometimes be empty. If they both have content, I'd like to make visible a buffer so there is some space between them, but this should remain hidden otherwise. My question is, how can I determine from the C# code-behind of my Master Page whether the ContentPla...

Adding elements to the Header of the masterpage from contentplaceholder in .NET

Hi guys, I'm with a problem The scenario is the follow: After submitting a form the user recieves one message says OK, and is redirected to another page after 2seconds. The problem is, when insert is sucefully, i add to the header of the masterpage a HtmlMeta element, but when i'm inserting from the contentplaceholder, i recieved a f...

ASP.NET: Having common Page title in master page with each page adding page-specific title?

My master page looks like: <head runat="server"> <title> <asp:ContentPlaceHolder ID="PageTitlePlaceHolder" runat="server" /> </title> Content pages look like: <asp:Content ID="TitleContent1" ContentPlaceHolderID="PageTitlePlaceHolder" runat="Server"> My Page </asp:Content> This works by placing the content ...

Can I know what page is in my master page's ContentPlaceHolder?

All the Google finds I ran into tell me how to use FindControl to access a control on the master from the content page itself. However, what I'm trying to do is the opposite. From the master page, I want to reference whichever child page is in the ContentPlaceHolder. Why you ask. I want the master page to know which tab should be activ...

ASP.NET MVC ContentPlaceHolders out of order?

I added a new ContentPlaceHolder (HeadContent) right below the Title so that I can add page-specific css and js files. But when I create a new View using the master page, it puts the default text of the page layout to have the HeadContent open/close tags at the end of the page. Unfortunately, I visually just see it as the first, second a...

Is it possible to read the content of a content place holder from the masterpage?

We would like to use a contentPlaceHolder in our pages to set titles. What we would like to do is have the masterpage check the contentPlaceHolder to see if it has content in it. This way we can set up an e-mailer that will tell us what pages that don't have page titles since we have a fairly large site. We also have nested masterpage...

I need really basic visual studios 08 help..

Im making a really basic website with only 4 pages in visual studios 08. Using the ASP.NET web application template I have created a master page and 4 associated content pages. I added a tree view to the master page to navigate between them. Could someone please explain the Contentplaceholder, how is it typically used? How do I move it? ...