master-pages

Does ColdFusion have an answer to ASP.NET's Master Pages?

I'm working on a website that was coded in ColdFusion. I have a CSS/HTML template I would like to apply to the content of every page, without duplicating any more code than necessary. I've gotten kind of spoiled by ASP.NET's master pages, which would be my preferred way to implement this site. Unfortunately, that option is unavailable to...

Problems with Site.Master and ASP.NET MVC

Hi folks, i'm trying to make my site master page (views/shared/site.master) strongly typed. eg. Inherits="TestProject.Mvc.Views.Shared.Site" I can't seem to get this work. Once i make the site.master page strongly, typed, Visual Studio seems to 'loose' what <%= Html.XXX %> is. Also, the page throws an error when i try to display the de...

masterpage module override

I have a masterpage which is set via a HTTPModule on PreInit(). HAPPY TIME! Problem is I need to override the masterpagefile value on a few pages due to a layout issue. Anyone know the best way? I tried adding a Page_Preinit on my page, but it is executed before the PreInit() in my module, so it ends up being reset there. I'm thinki...

Best way to wire up database-driven menu in ASP.NET MVC

I'm looking for a way to handle a database-driven menu in ASP.NET MVC that doesn't violate the MVC principles. I want to replace the hard-coded, default, "Home, About" menu with something from my database. How would I wire this up? Would I just set up a ContentPlaceHolder in my Site.Master and have regenerated in my Views? That does...

Finding controls inside nested master pages

I have a master page which is nested 2 levels. It has a master page, and that master page has a master page. When I stick controls in a ContentPlaceHolder with the name "bcr" - I have to find the controls like so: Label lblName =(Label)Master.Master.FindControl("bcr").FindControl("bcr").FindControl("Conditional1").FindControl("ctl03")...

Code-Level Tracing in VB.NET

How do I define the Trace Constant for a Web Site in VB.NET to enable trace output? I know where it is for web applications, but I cannot find it for web sites. ...

Master Form concept?

Like Master pages in ASP.NET, do we have any similar concept for Windows Form application. So that I dont have to repeat the same portion of form (Header and footer) many times through out the application. ...

Proper way to use JQuery when using MasterPages in ASP.NET?

I have no issues when doing using JQuery in a aspx page without a masterpage, but when I try to use it in pages that have a masterpage, it doesn't work, so I end up putting the jquery files and other script files in the page instead of the master. Now if I have 10 pages, I am doing this for all 10, which I know is incorrect. In the sam...

Base Page or Base Master Page or Nested Masters?

I've got a site with two master pages: one for one-column layout and one for two-column layout. These are nested within a master page that provides a common header and footer. I have functionality that I want each of the content pages to have; should I: create a page base class and inherit that inside my content pages, or create a mas...

asp.net - set master page form ID dynamically

I am working on a site which uses master pages (no big deal), and has a form in the master page. Currently, the form name in the rendered content is always "aspnetform". I need to change some of the pages that use this master page, and I need to set the form name to something specific for that page (for SEO reasons). Is there a simple...

Sending Event from a Page to its Master Page in ASP.NET

Hello, How do I raise an event in a content page that its master page can then respond to? For example, I have a content page which is using a master page. The master page contains the website navigation bar. Depending on the page I'm on, I'd like to send an event to the master page to change the CSS class of the current page menu item...

ASP.NET - cant GetType() of MasterPage

I have a MasterPage and get its type as follows: No problem, this works Now, when I create an aspx page and try the same thing I get null: Why? How can I get this to work? NOTE The answers below say I need to reference an Assembly. But how do I do that when I am running this application as an ASP.NET website - there are on comp...

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 <html> <body> <asp:ContentPlaceHolder ID="Foo" runat="server"> </asp:ContentPlaceHolder> <!-- page content --> <asp:ContentPlaceHold...

Some sort of master page for java servlet using css

Hi I am creating a web application using Netbeans and servlets. I have used some css into my pages. Is there a way how I can put the banner and menu which every servlet will have in one place so I do not need to rewrite this in every servlet? Thank you ...

How to create a strongly typed master page using a base controller in ASP.NET MVC

Following the NerdDinners example, I am interested in creating a strongly typed Master Page. In order to achieve this, I use a base controller which retrieves the data for the master page. All other controllers inherit this class. Similarly, I have ViewModels for the master page and any other views. The view ViewModel classes inherit fro...

How To Make UserControl In MasterPage Public For All Child Pages

I have a UserControl which I have added to my web.config <add tagPrefix="BCF" src="~/controls/MyMessageBox.ascx" tagName="error"/> and added to my master page <BCF:error ID="BCError" runat="server" Visible="false" /> Now I need to be able to reference this control AND its public properties from all child pages that use that masterp...

SharePoint: How to apply a custmised masterpage to Sharepoint build-in search results page (OSSSearchResults.aspx)

SharePoint: How to apply a customised masterpage to Sharepoint build-in search results page (OSSSearchResults.aspx) I have apply the sharepoint sites to use my own customised masterpage, but the search result page(OSSSearchResults.aspx) does not pick my masterpage up. Can anyone help me? Many thanks. ...

MOSS - Nested Master Page Problem

I have created a child master which references a parent master. I have deployed this as a feature and stapled the feature to many site definitions. When I turn on the feature, both my parent and child masters are rendering correctly - everything is as it should be. However, when I open up SharePoint designer and customize child.master...

Silverlight master page

hello I am new to Silverlight and have decided to give it a go. I have no idea how to create a master page (page.xaml) using Silverlight... Any help will be appreciated, Thanks ...

ASP.NET MVC - different models for master page and view page

I have a strongly typed master page, but I want to use a different type for some of it's child pages. For example, on the master page... <%@ Master ... Inherits="System.Web.Mvc.ViewMasterPage<MyWeb.Models.Client>" %> Client is already a composite object, so on some of the child pages I can keep to the same model and just reference me...