Created
May 7, 2011 02:40
-
-
Save brlinton/960144 to your computer and use it in GitHub Desktop.
Sample ViewPage Base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Web.Mvc; | |
namespace MyNamespace.Application | |
{ | |
public abstract class ApplicationViewPage<T> : WebViewPage<T> | |
{ | |
protected override void InitializePage() | |
{ | |
SetViewBagDefaultProperties(); | |
base.InitializePage(); | |
} | |
private void SetViewBagDefaultProperties() | |
{ | |
ViewBag.CurrentYear = DateTime.Now.Year.ToString(); | |
// other awesome view bag initializations | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment