Export (0) Print
Expand All

ModelDataSourceView Class

.NET Framework 4.5

Represents a single view of a ModelDataSource control.

System.Object
  System.Web.UI.DataSourceView
    System.Web.UI.WebControls.ModelDataSourceView

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public class ModelDataSourceView : DataSourceView, 
	IStateManager

The ModelDataSourceView type exposes the following members.

  NameDescription
Public methodModelDataSourceViewInitializes a new instance of the ModelDataSourceView class.
Top

  NameDescription
Public propertyCanDeleteGets a value that indicates whether the ModelDataSourceView object that is associated with the current ModelDataSource control supports the delete operation. (Overrides DataSourceView.CanDelete.)
Public propertyCanInsertGets a value that indicates whether the ModelDataSourceView object that is associated with the current ModelDataSource control supports the insert operation. (Overrides DataSourceView.CanInsert.)
Public propertyCanPageGets a value that indicates whether the ModelDataSourceView object that is associated with the current ModelDataSource control supports paging through the retrieved data. (Overrides DataSourceView.CanPage.)
Public propertyCanRetrieveTotalRowCountGets a value that indicates whether the ModelDataSourceView object that is associated with the current ModelDataSource control supports retrieving the total number of data rows, in addition to the set of data. (Overrides DataSourceView.CanRetrieveTotalRowCount.)
Public propertyCanSortGets a value that indicates whether the ModelDataSourceView object that is associated with the current ModelDataSource control supports a sorted view on the underlying data source. (Overrides DataSourceView.CanSort.)
Public propertyCanUpdateGets a value that indicates whether the ModelDataSourceView object that is associated with the current ModelDataSource control supports the update operation. (Overrides DataSourceView.CanUpdate.)
Public propertyDataKeyNameGets the first item in the DataKeyNames array of the data-bound control if the data-bound control is a FormView, ListView, GridView, or DetailsView control.
Public propertyDeleteMethodGets or sets the name of the method that the ModelDataSourceView object invokes to delete data.
Protected propertyEventsGets a list of event-handler delegates for the data source view. (Inherited from DataSourceView.)
Public propertyInsertMethodGets or sets the name of the method that the ModelDataSourceView object invokes to insert data.
Public propertyModelTypeNameGets the data type name for the data bound control.
Public propertyNameGets the name of the data source view. (Inherited from DataSourceView.)
Public propertySelectMethodGets or sets the name of the method that the ModelDataSourceView control invokes to retrieve data.
Public propertyUpdateMethodGets or sets the name of the method that the ModelDataSourceView object invokes to update data.
Top

  NameDescription
Public methodCanExecuteDetermines whether the specified command can be executed. (Inherited from DataSourceView.)
Protected methodCreateSelectResultReturns the result of a Select operation after converting it to an IEnumerable collection if it is not already one.
Public methodDeleteDeletes a method and gets the result. (Overrides DataSourceView.Delete(IDictionary, IDictionary, DataSourceViewOperationCallback).)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodEvaluateDeleteMethodParametersInvokes the Delete method and gets the result.
Protected methodEvaluateInsertMethodParametersInvokes the insert method.
Protected methodEvaluateMethodParameters(DataSourceOperation, ModelDataSourceMethod, IDictionary)Evaluates the method parameters for model binding, using the data source operation, the data source method object, and the control values.
Protected methodEvaluateMethodParameters(DataSourceOperation, ModelDataSourceMethod, IDictionary, Boolean)Evaluates the method parameters for model binding, using the data source operation, the data source method object, the control values, and a value that indicates whether this method is called in the page's LoadComplete event handler.
Protected methodEvaluateSelectMethodParametersEvaluates the select method parameters and also determines the options for processing the select result, such as auto paging and sorting behavior.
Protected methodEvaluateUpdateMethodParametersInvokes the Update method and gets the result.
Protected methodExecuteCommand(String, IDictionary, IDictionary)Executes the specified command. (Inherited from DataSourceView.)
Public methodExecuteCommand(String, IDictionary, IDictionary, DataSourceViewOperationCallback)Executes the specified command. (Inherited from DataSourceView.)
Protected methodExecuteDeletePerforms a delete operation using the DeleteMethod method. (Overrides DataSourceView.ExecuteDelete(IDictionary, IDictionary).)
Protected methodExecuteInsertPerforms an insert operation using the InsertMethod method. (Overrides DataSourceView.ExecuteInsert(IDictionary).)
Protected methodExecuteSelectPerforms a select operation using the SelectMethod method. (Overrides DataSourceView.ExecuteSelect(DataSourceSelectArguments).)
Protected methodExecuteUpdatePerforms an update operation using the UpdateMethod method. (Overrides DataSourceView.ExecuteUpdate(IDictionary, IDictionary, IDictionary).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodFindMethodFinds the method to be executed.
Protected methodGetDeleteMethodResultInvokes the delete method and gets the result.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Protected methodGetInsertMethodResultInvokes the insert method and gets the result.
Protected methodGetSelectMethodResultInvokes the select method and gets the result.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodGetUpdateMethodResultInvokes the update method and gets the result.
Public methodInsertInserts a method and gets the result. (Overrides DataSourceView.Insert(IDictionary, DataSourceViewOperationCallback).)
Protected methodInvokeMethodInvokes a data method.
Protected methodIsTrackingViewStateReturns a value that indicates whether the control stores state in view state.
Protected methodLoadViewStateRestores previously saved view state for the data source view.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodOnCallingDataMethodsRaises the CallingDataMethods event.
Protected methodOnDataSourceViewChangedRaises the DataSourceViewChanged event. (Inherited from DataSourceView.)
Protected methodProcessSelectMethodResultPerforms operations on the select method result like auto paging and sorting if applicable.
Protected methodRaiseUnsupportedCapabilityErrorCalled by the RaiseUnsupportedCapabilitiesError method to compare the capabilities requested for an ExecuteSelect operation against those that the view supports. (Inherited from DataSourceView.)
Protected methodSaveViewStateSaves the changes to the view state for the ModelDataSourceView object since the time when the page was posted back to the server.
Public methodSelectSelects the method and gets the result. (Overrides DataSourceView.Select(DataSourceSelectArguments, DataSourceViewSelectCallback).)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Protected methodTrackViewStateCauses the ModelDataSourceView object to track changes to its view state so that the changes can be stored in the ViewState object for the control and persisted across requests for the same page.
Public methodUpdateUpdates the specified methods using the values provided in the parameters. (Overrides DataSourceView.Update(IDictionary, IDictionary, IDictionary, DataSourceViewOperationCallback).)
Public methodUpdatePropertiesUpdates the specified properties using the values provided in the parameters.
Top

  NameDescription
Public eventCallingDataMethodsOccurs when data methods are being called.
Public eventDataSourceViewChangedOccurs when the data source view has changed. (Inherited from DataSourceView.)
Top

  NameDescription
Explicit interface implemetationPrivate propertyIStateManager.IsTrackingViewStateGets a value indicating whether a server control is tracking its view state changes.
Explicit interface implemetationPrivate methodIStateManager.LoadViewStateInfrastructure. Loads the server control’s previously saved view state to the control.
Explicit interface implemetationPrivate methodIStateManager.SaveViewStateInfrastructure. Saves the changes to a server control’s view state to an Object.
Explicit interface implemetationPrivate methodIStateManager.TrackViewStateInfrastructure. Instructs the server control to track changes to its view state.
Top

For a tutorial series on using model binding with Web Forms, see Model Binding and Web Forms.

.NET Framework

Supported in: 4.6, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft