Hi,
the SqlDataSource controls hasfilterparameters that you can set through the wizard, or in markup, and then you can use for example the controlparameter:
<asp:ControlParameter Name="Title" ControlId="DropDownList1" PropertyName="SelectedValue"/>
Be sure totake a look at this example.
Grz, Kris.
|||Thanks. But how can the following be implemented in the FilterParmeters?
Sub LoadGrid()
Dim sqlText As String
If IsPostBack And cboState.SelectedValue <> "0" Then
sqlText = "SELECT * FROM Customers WHERE State='" & cboState.SelectedValue & "'"
Else
sqlText = "SELECT * FROM Customers"
End If
gridCust.DataSource = GetDataView(sqlText, cnn)
gridCustDataBind()
End Sub
No comments:
Post a Comment