ValidationSummary.OnInit(EventArgs) 方法
定義
protected public:
override void OnInit(EventArgs ^ e);
protected internal override void OnInit (EventArgs e);
override this.OnInit : EventArgs -> unit
Protected Friend Overrides Sub OnInit (e As EventArgs)
參數
事件資料。The event data.
備註
在這個方法呼叫基底控制項的 OnInit 方法之後, ForeColor Red 如果下列條件成立,就會將屬性設定為:After this method calls the base control's OnInit method, it sets the ForeColor property to Red if the following conditions are true:
Control.RenderingCompatibility屬性工作表示早于4的 ASP.NET 版本。The Control.RenderingCompatibility property indicates an ASP.NET version earlier than 4. 根據預設,在 ASP.NET 4 和更新版本中,驗證器控制項不會以紅色顯示錯誤訊息。By default, in ASP.NET 4 and later versions, validator controls do not display error messages in red. 如需如何控制驗證程式控制項視覺外觀的詳細資訊,請參閱 在 ASP.NET Web Pages 中驗證使用者輸入。For information about how to control the visual appearance of validator controls, see Validating User Input in ASP.NET Web Pages.