ObjectDataSourceView(ObjectDataSource, String, HttpContext) Конструктор
Определение
Инициализирует новый экземпляр класса ObjectDataSourceView.Initializes a new instance of the ObjectDataSourceView class.
public:
ObjectDataSourceView(System::Web::UI::WebControls::ObjectDataSource ^ owner, System::String ^ name, System::Web::HttpContext ^ context);
public ObjectDataSourceView (System.Web.UI.WebControls.ObjectDataSource owner, string name, System.Web.HttpContext context);
new System.Web.UI.WebControls.ObjectDataSourceView : System.Web.UI.WebControls.ObjectDataSource * string * System.Web.HttpContext -> System.Web.UI.WebControls.ObjectDataSourceView
Public Sub New (owner As ObjectDataSource, name As String, context As HttpContext)
Параметры
- owner
- ObjectDataSource
Класс ObjectDataSourceView, связанный с классом ObjectDataSourceView.The ObjectDataSourceView that the ObjectDataSourceView is associated with.
- name
- String
Уникальное имя представления источника данных в пределах элемента управления источниками данных, к которому оно принадлежит.A unique name for the data source view, within the scope of the data source control that owns it.
- context
- HttpContext
Текущий контекст HttpContext.The current HttpContext.
Комментарии
ObjectDataSourceViewКонструктор вызывается GetView методом для возврата нового экземпляра представления источника данных с указанным viewName
параметром.The ObjectDataSourceView constructor is called by the GetView method to return a new instance of a data source view with the specified viewName
parameter. ObjectDataSourceЭлемент управления связан только с одним элементом ObjectDataSourceView в любое время и всегда имеет имя представления DefaultView
, хотя это ограничение именования накладывается ObjectDataSource элементом управления, а не ObjectDataSourceView .The ObjectDataSource control is associated with only one ObjectDataSourceView at any time, and always names the view DefaultView
, although this naming restriction is imposed by the ObjectDataSource control, not the ObjectDataSourceView. Можно переопределить GetView метод для поддержки представлений с другим соглашением об именовании.You can override the GetView method to support views with a different naming convention.
HttpContextОбъект, передаваемый по, context
используется представлением источника данных для доступа к объектам параметров, таким как FilterParameters Свойства и SelectParameters .The HttpContext object that is passed by context
is used by the data source view to access parameter objects, such as FilterParameters and SelectParameters properties.