ObjectDataSource.GetView(String) Metoda
Definicja
Pobiera nazwany widok źródła danych, który jest skojarzony z formantem źródła danych.Retrieves the named data source view that is associated with the data source control.
protected:
override System::Web::UI::DataSourceView ^ GetView(System::String ^ viewName);
protected override System.Web.UI.DataSourceView GetView (string viewName);
override this.GetView : string -> System.Web.UI.DataSourceView
Protected Overrides Function GetView (viewName As String) As DataSourceView
Parametry
- viewName
- String
Nazwa widoku do pobrania.The name of the view to retrieve. Ponieważ ObjectDataSource obsługuje tylko jeden widok, viewName
jest ignorowany.Because the ObjectDataSource supports only one view, viewName
is ignored.
Zwraca
ObjectDataSourceViewNazwa DefaultView
, która jest skojarzona z ObjectDataSource .The ObjectDataSourceView named DefaultView
that is associated with the ObjectDataSource.
Wyjątki
Określona viewName
wartość jest null
lub coś innego niż DefaultView
.The specified viewName
is null
or something other than DefaultView
.
Uwagi
ObjectDataSourceKontrolka obsługuje tylko jeden widok źródła danych.The ObjectDataSource control supports only one data source view. Podobnie jak w przypadku wszystkich obiektów widoku źródła danych, ObjectDataSourceView który jest skojarzony z formantem źródła danych definiuje jego możliwości, wykonuje wszystkie czynności niezbędne do pobrania danych z bazowego magazynu danych oraz wykonuje operacje, takie jak sortowanie, wstawianie, usuwanie i aktualizowanie.As with all data source view objects, the ObjectDataSourceView that is associated with the data source control defines its capabilities, performs all the work that is necessary to retrieve data from the underlying data storage, and performs operations such as sorting, inserting, deleting, and updating.
GetViewMetoda jest przeznaczona do wywołania przez kontrolki powiązane z danymi, a nie przez kod strony.The GetView method is intended to be called by data-bound controls, not by page code.