ViewPage 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
表示將檢視呈現為 Web Form 網頁所需的屬性和方法。
public class ViewPage : System.Web.UI.Page, System.Web.Mvc.IViewDataContainer
type ViewPage = class
inherit Page
interface IViewDataContainer
Public Class ViewPage
Inherits Page
Implements IViewDataContainer
- 繼承
-
ViewPage
- 衍生
- 實作
建構函式
ViewPage() |
初始化 ViewPage 類別的新執行個體。 |
屬性
Ajax |
取得或設定 AjaxHelper 物件,這個物件用於在 Ajax 案例中轉譯 HTML。 |
Html |
取得或設定 HtmlHelper 用來呈現 HTML 專案的 物件。 |
MasterLocation |
取得或設定主版檢視的路徑。 |
Model |
取得相關聯 ViewDataDictionary 物件的 Model 屬性。 |
TempData |
取得要傳遞至檢視的暫存資料。 |
Url |
取得或設定呈現之網頁的 URL。 |
ViewBag |
取得檢視包。 |
ViewContext |
取得或設定用來呈現檢視的資訊。 |
ViewData |
取得或設定字典,這個字典包含要在控制器和檢視之間傳遞的資料。 |
Writer |
取得用於將檢視呈現至回應的文字寫入器。 |
方法
InitHelpers() | |
OnPreInit(EventArgs) |
在頁面初始化的開始處引發 PreInit 事件。 |
ProcessRequest(HttpContext) |
讓 ASP.NET MVC Framework 可以處理指定的 HTTP 要求。 |
Render(HtmlTextWriter) |
HtmlTextWriter初始化 物件,這個物件會接收要轉譯的頁面內容。 |
RenderView(ViewContext) |
使用指定的檢視內容,將檢視網頁呈現至回應。 |
SetTextWriter(TextWriter) |
已淘汰.
注意:此 API 現在已過時。設定用來將檢視轉譯為回應的文字寫入器。 |
SetViewData(ViewDataDictionary) |
設定關聯檢視的檢視資料字典。 |