FormView.CreateControlStyle 方法

定義

建立 FormView 控制項的預設資料表樣式物件。

protected:
 override System::Web::UI::WebControls::Style ^ CreateControlStyle();
protected override System.Web.UI.WebControls.Style CreateControlStyle ();
override this.CreateControlStyle : unit -> System.Web.UI.WebControls.Style
Protected Overrides Function CreateControlStyle () As Style

傳回

Style,包含 FormView 控制項的預設資料表樣式。

備註

方法是 CreateControlStyle 控制項所 FormView 呼叫的協助程式方法,可建立其預設資料表樣式物件。 除了設定物件的預設樣式 TableStyle 之外,這個方法也會將 CellPadding 屬性設定為 0。

給繼承者的注意事項

擴充 FormView 類別時,您可以覆寫這個方法以建立您自己的預設樣式。

適用於

另請參閱