Last active
August 29, 2015 14:25
-
-
Save josephwoodward/6a820275961b79562de7 to your computer and use it in GitHub Desktop.
Write to section in ASP.NET MVC
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
public static IHtmlString PageHeading(this HtmlHelper html, Icon icon, string title, string subTitle) | |
{ | |
WebViewPage page = html.ViewDataContainer as WebViewPage; | |
if (page != null) | |
{ | |
page.DefineSection("Heading", () => { | |
page.Write(MvcHtmlString.Create("My Text")); | |
}); | |
} | |
return new HtmlString(string.Empty); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment