共用方式為


ObjectListCommandEventArgs.DefaultCommand 欄位

定義

取得或設定預設指令名稱。 這個 API 已經過時了。 有關如何開發 ASP.NET 行動應用程式的資訊,請參閱 Mobile Apps &ASP.NET 的網站。

protected: static initonly System::String ^ DefaultCommand;
protected static readonly string DefaultCommand;
 staticval mutable DefaultCommand : string
Protected Shared ReadOnly DefaultCommand As String 

欄位值

備註

設定後,會 ObjectList 嘗試渲染一個捷徑以呼叫預設指令。 在 HTML 中,預設ListView渲染會將第一個欄位顯示為 的連結DetailsViewObjectList。 透過設定該 DefaultCommand 屬性,點擊連結即可啟動預設指令。 呼叫預設指令會觸發事件 ItemCommand 。 物件的 CommandNameObjectListCommandEventArgs設定為屬性DefaultCommand的值。

即使預設指令有定義,你也應該在指令集合中包含同名指令。 如果控制項無法渲染包含預設指令捷徑的圖形元素,預設指令仍可透過渲染 ObjectListCommandCollection取得。

適用於

另請參閱