1 /* ****************************************************************************
\r
3 * Copyright (c) Microsoft Corporation. All rights reserved.
\r
5 * This software is subject to the Microsoft Public License (Ms-PL).
\r
6 * A copy of the license can be found in the license.htm file included
\r
7 * in this distribution.
\r
9 * You must not remove this notice, or any other, from this software.
\r
11 * ***************************************************************************/
\r
13 namespace System.Web.Mvc {
\r
15 public class ViewMasterPage<TModel> : ViewMasterPage {
\r
16 private AjaxHelper<TModel> _ajaxHelper;
\r
17 private HtmlHelper<TModel> _htmlHelper;
\r
18 private ViewDataDictionary<TModel> _viewData;
\r
20 public new AjaxHelper<TModel> Ajax {
\r
22 if (_ajaxHelper == null) {
\r
23 _ajaxHelper = new AjaxHelper<TModel>(ViewContext, ViewPage);
\r
29 public new HtmlHelper<TModel> Html {
\r
31 if (_htmlHelper == null) {
\r
32 _htmlHelper = new HtmlHelper<TModel>(ViewContext, ViewPage);
\r
38 public new TModel Model {
\r
40 return ViewData.Model;
\r
44 public new ViewDataDictionary<TModel> ViewData {
\r
46 if (_viewData == null) {
\r
47 _viewData = new ViewDataDictionary<TModel>(ViewPage.ViewData);
\r