View Single Post
  #3 (permalink)  
Old February 28th, 2013, 04:41 PM
hanci hanci is offline
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2013
Location: Delft, Netherlands
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, you're right, it was the curly brackets (my reading error) that caused the problem. But the solution I found for getting it to work anyway helped me to find a way to use the alternative notation for page data, which gives errors with the curly bracket notation and which I prefer because it stands out clearer in the code:

Code:
@RenderPage("~/Shared/_Footer.cshtml", new DateTime (PageData["Year"] = DateTime.Now.Year))
and in the footer:

Code:
© 2012-@PageData["Year"], SomeName
This works fine, but maybe it is a clumsy way to get this result?

Hans
Reply With Quote