LinqDataSourceSelectEventArgs.Arguments 屬性

定義

取得決定資料之傳回方式的值。

public:
 property System::Web::UI::DataSourceSelectArguments ^ Arguments { System::Web::UI::DataSourceSelectArguments ^ get(); };
public System.Web.UI.DataSourceSelectArguments Arguments { get; }
member this.Arguments : System.Web.UI.DataSourceSelectArguments
Public ReadOnly Property Arguments As DataSourceSelectArguments

屬性值

物件,包含決定資料之傳回方式的值。

備註

資料繫結控制項會透過 Arguments 屬性將屬性傳遞至 LinqDataSource 控制項,以指定應該如何進行分頁和排序。 AutoPage如果 屬性或 AutoSort 屬性設定 true 為 ,控制項 LinqDataSource 就會根據資料繫結控制項的屬性自動排序或分頁。

您可以藉由將 和 AutoSort 屬性設定 AutoPagefalse ,然後建立 Selecting 事件的處理常式,自訂如何從查詢排序和分頁資料。 在事件處理常式中 Arguments ,使用 屬性從資料繫結控制項擷取排序和分頁屬性。 然後視需要自訂查詢,根據 屬性的屬性 ArgumentsRetrieveTotalRowCount如果 物件的 屬性 DataSourceSelectArguments 設定 true 為 ,您必須傳 TotalRowCount 回 屬性的值。

適用於

另請參閱