ASP.NET MVC Master Pages

前端 未结 3 1770
北海茫月
北海茫月 2021-02-04 03:17

What\'s the difference between the ASP.NET Master Page, and the MVC Master Page? And the AJAX Master Page for that matter?

3条回答
  •  终归单人心
    2021-02-04 03:35

    The ViewMasterPage in MVC is little more than a master page that exposes the same helpers as the ViewPage. This gives you access to the AjaxHelper, HtmlHelper, TempDataDictionary, UrlHelper, ViewContext, ViewData, and the HtmlTextWriter.

    Like the ViewPage, when you are using the WebFormsViewEngine (default), you should resist any urge to overload page lifecycle events at all costs! They are still there, and they will still run since under the hood ProcessRequest(...) is still called on the page.

    Which AJAX master page are you referring to? I'm not familiar with any included with the framework...

提交回复
热议问题