1
/* ****************************************************************************
3
* Copyright (c) Microsoft Corporation. All rights reserved.
5
* This software is subject to the Microsoft Public License (Ms-PL).
6
* A copy of the license can be found in the license.htm file included
7
* in this distribution.
9
* You must not remove this notice, or any other, from this software.
11
* ***************************************************************************/
13
namespace System.Web.Mvc {
14
using System.Globalization;
15
using System.Web.Mvc.Resources;
18
public class ViewMasterPage : MasterPage {
19
public AjaxHelper Ajax {
25
public HtmlHelper Html {
33
return ViewData.Model;
37
public TempDataDictionary TempData {
39
return ViewPage.TempData;
43
public UrlHelper Url {
49
public ViewContext ViewContext {
51
return ViewPage.ViewContext;
55
public ViewDataDictionary ViewData {
57
return ViewPage.ViewData;
61
internal ViewPage ViewPage {
63
ViewPage viewPage = Page as ViewPage;
64
if (viewPage == null) {
65
throw new InvalidOperationException(String.Format(CultureInfo.CurrentUICulture, MvcResources.ViewMasterPage_RequiresViewPage));
71
public HtmlTextWriter Writer {
73
return ViewPage.Writer;