Intersoft Support Center

Use Multiple Parameters

FilterParameters is a collection of parameters that you can use to fill a placeholder in FilterExpression. (e.g : Country Like '{0}%' AND City Like '{1}%'). The placeholders are replaced according to the index of the parameter in the FilterParameters collection.

This sample demonstrates how to use FilterParameters (multiple parameters [Country & City])

To use ISDataSource along with Multiple FilterParameters

  1. Binding DataSet to ISDataSource. (Use Customers table).
  2. Open ISDataSource designer and add Country Like '{0}%' AND City Like '{1}%' to FilterExpression property.MultipleParam

  3. Add 2 TextBoxes and a server-side button.
  4. Right-click on ISDataSource control and go to the Designer >> Table Customers >> Filter Parameters collection.
  5. Add 2 parameters to be linked to the textboxes.IsDSMultipleParams2

  6. Write the following function in OnButtonClick client-side event :
    C# Copy ImageCopy Code
    protected void Button1_Click(object sender, EventArgs e)
    
    {
    GridView1.DataBind();
    }

  7. The result will be like following.

    MultipleParams
Previous Next