I have a Layout File that is used by both my main site and the Admin area. In the Layout I make a call to the MVCSiteMapProvider to generate my layouts. What I would like to do is setup a string in the _ViewStart file that I can pass into the Layout to designate which sitemap to use. Is it possible to pass variables from the _ViewStart down the Layout file and if so how?
Just off the top of my head you could use PageData.
Provides array-like access to page data that is shared between pages, layout pages, and partial pages.
C#
@{
PageData["MyString"] = "Test!";
}
VB.NET
@Code
PageData("MyString") = "Test!"
End Code
C#
@PageData["MyString"]
VB.NET
@PageData("MyString")