MobilePage.EnableEventValidation 屬性

定義

取得或設定值,指出是否應驗證回傳事件資料。 這個 API 已經過時。 如需如何開發 ASP.NET 行動應用程式的資訊,請參閱 mobile Apps & Sites with ASP.NET

public:
 virtual property bool EnableEventValidation { bool get(); void set(bool value); };
public override bool EnableEventValidation { get; set; }
member this.EnableEventValidation : bool with get, set
Public Overrides Property EnableEventValidation As Boolean

屬性值

false.

例外狀況

嘗試設定此屬性。

備註

ASP.NET 控件會建立用戶端腳本,以在伺服器上引發回傳事件。 惡意使用者可以使用回傳腳本將任意張貼事件傳送至伺服器控件。 因此,ASP.NET 2.0 版控件會驗證事件數據,以確保事件是由控件轉譯的用戶端程式代碼所引發。

行動頁面不支援事件驗證。

適用於

另請參閱