System.Web.UI.WebControls.SqlDataSourceView.ParameterPrefix Property

Gets the string that is used to prefix a parameter placeholder in a parameterized SQL query.

Syntax

protected virtual string ParameterPrefix { get; }

Value

Documentation for this section has not yet been entered.

Remarks

SQL queries and commands can be parameterized, in that they contain placeholders for values that are bound to the query at run time. Depending on the ADO.NET provider that is set for the System.Web.UI.WebControls.SqlDataSource control, which is identified by the SqlDataSource.ProviderName property, the parameters are evaluated by alias or by their ordering in the System.Web.UI.WebControls.ParameterCollection object.

If the SqlDataSource.ProviderName is not set or is set to the System.Data.SqlClient, parameters are evaluated by alias and the SqlDataSourceView.ParameterPrefix property is used to add a parameter prefix to the Parameter.Name property of each System.Web.UI.WebControls.Parameter object in a System.Web.UI.WebControls.ParameterCollection during a data retrieval or data manipulation operation. If the SqlDataSource.ProviderName property is set to the System.Data.OleDb or System.Data.Odbc, the parameters are evaluated by order and the SqlDataSourceView.ParameterPrefix and Parameter.Name properties are ignored.

If you extend the System.Web.UI.WebControls.SqlDataSourceView class, you can override the SqlDataSourceView.ParameterPrefix property to supply a prefix other than the "@" string, if required.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0