site.master

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...

can i have multiple site.master files in asp.net mvc

i have a number of files that i want to have the same "base" layout so i am using the site.master file for this and its working perfectly. but now i want another set of pages with a different "site.master" file. can i have multiple site.master files in one solution ...

how do i reference the main master in a nested master page scenario in asp.net

i see that this question has been answered: http://stackoverflow.com/questions/947134/are-there-nested-master-pages-in-asp-net-mvc but i have a follow up questions, if i have nested master pages: site.master section.master page where page has a master of section.master and section.master itself has a master of site.master can i refer...

how do i have links to root controllers in site.master in asp.net mvc

in my site.master file, i have the following code: <map name="indexMap"> <area shape="rect" coords="3,9,59,24" href= "Home"> <area shape="rect" coords="73,8,146,24" href="CourseBio"> <area shape="rect" coords="168,8,235,24" href="ProShop"> <area shape="rect" coords="257,7,336,24" href="ScoreCard"> <area shape="rect" coords="35...

Passing Data to View Master Pages

Hi I am following the tutorial to pass data to view master page using the "good solution" from this link http://www.asp.net/learn/mvc/tutorial-13-cs.aspx but after doing the changes as instructed, when i run the application. the application run the action result from homecontroller. Should i made change in homecontroller, i am missing so...

ASP.NET MVC - Do stylesheets have to go in the Site.Master file?

Hi all, I noticed that I cannot add stylesheets on any page. They must be added to the master page. I already have about 15 stylesheets in the master view, which seems like overkill, since only some of the pages use a certain stylesheet. I imagine I could reference the file via javascript (although, I can't think of how off the top of...

How to add a weather info to be evalueated only once???

Hi everybody! In a ASP.MVC (1.0) project i managed to get weather info from a RSS feed and to show it up. The problem i have is performance: i have put a RenderAction() Method in the Site.Master file (which works perfectly) but i 'm worried about how it will behave if a user clicks on menu point 1, after some seconds on menu point 2, a...

How to check if a variable is defined in a Master file in ASP.NET MVC

I've got a Site.Master file I've created to be my template for the majority of the site, with a navigation. This navigation is dynamically created, based on a recursive Entity (called Page) - Pages with a parentID of 0 are top level, and naturally each child carries it's parent's Id in that field. I've created a quick little HTML Helpe...

Adding a ContentPlaceHolder to site.master

Apologies for the terribly newb question. We're currently implementing Google Web Optimizer in our ASP.NET Web Application and some of the code is supposed to go in very specific places on certain pages. For example, for the "Control Page" Google has some Javascript that sits outside of the <html> tags. I know I probably don't need to p...

Call an action in a controller and continue with the view from the same point with the same info

Hello, What I am looking to do is have my site.master call a specific controller action, and then continue to process the current request without any view or information change. I want to do this in the site.master because I want this action to run on every page that is loaded, and since all pages use my site.master (as I have not creat...

Site.Master rendering changes when switching to a new area

My application displays an initial page with the following HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head><base href="http://localhost:1578/"&gt; ..... <link href="css/lowprofile.css" rel="stylesheet" type=...

using different site.master files for themes

is having different site.master files common practices for theming. right now i have my menu system and different links and styles based on different ".master" files in an asp.net-mvc site. another developer thought that was a strange approach and i wanted to get some thoughts from the community. ...

Unable to reference CSS properly in Site.Master with MVC2 in a Virtual Directory

Currently, I have a Site.Master page for my MVC app that renders great when run directly from VS2008. It looks like this: <%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; <html xmlns="http://www.w3.org/19...

How to check current user role on Site.Master page?

I need to write a menu in Site.Master where certain menu items have to be visible or not depending on current user role. How can I check that from the page? Usually would just write the logic in a controller, but the Site.Master doesn't have one (in my project at least!). I'd appreciate any pointers. ...