System.Web.UI.WebControls Namespace SqlDataSource Class
.NET Framework version 2.0
Sets or retrieves a value indicating whether the text in the SelectCommand property is an SQL query or the name of a stored procedure.
Inline |
<asp:SqlDataSource selectcommandtype = enumValue ... > |
Script |
SqlDataSource.SelectCommandType [ = enumValue ] |
The property is read/write with a default value of Text.
The SelectCommandType property delegates to the SelectCommandType property of the SqlDataSourceView object that is associated with the SqlDataSource control.
The following example demonstrates how to set the SelectCommand value to the name of a Microsoft Access query and the SelectCommandType property to the StoredProcedure value, in order to retrieve data from a Microsoft Access database and display it in a GridView control.
<asp:accessdatasource id="zipcodes" runat="server"
datafile="~/app_data/usa.mdb"
selectcommand="[Zipcodes By State and County]"
selectcommandtype="StoredProcedure">
<selectparameters>
<asp:controlparameter controlid="lstStates"
propertyname="SelectedValue" />
<asp:controlparameter controlid="lstCounties"
propertyname="SelectedValue" />
</selectparameters>
</asp:accessdatasource>
Show me
SelectCommand