Skip to content

Instantly share code, notes, and snippets.

@juanplopes
Created January 19, 2011 14:26
Show Gist options
  • Save juanplopes/786228 to your computer and use it in GitHub Desktop.
Save juanplopes/786228 to your computer and use it in GitHub Desktop.
public class SimpleHelper : System.Web.WebPages.HelperPage
{
public static new WebViewPage Page
{
get { return (WebViewPage)WebPageContext.Current.Page; }
}
public static new HtmlHelper Html
{
get { return Page.Html; }
}
}
@using Simple.Web.Mvc
@inherits SimpleHelper
@helper PageTitle(string title, string description)
{
<div class="form-title">
<h2>@title</h2>
<p>@description</p>
</div>
@Html.SimpleValidationSummary("Error during processing.")
<div class="auto-hide">
@Page.ViewData.NoticeSuccess()
@Page.ViewData.NoticeError()
@Page.TempData.NoticeSuccess()
@Page.TempData.NoticeError()
</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment