Multiple FilterParameters in GridView

Discussion in 'ASP .Net' started by David, Apr 19, 2006.

  1. David

    David Guest

    Using VS2005 and SQL2005.
    Is there any way to handle multiple FilterParameters or ControlParameters in
    SQLDataSource on a GridView? I have 4 asp:textbox fields that can have any
    combination of conditions, but if empty I want to ignore them. I know how
    to do it in SQL code but want to eliminate that if I can do it with
    parameters in SQLDataSource control. I am using just 1 now (see below) and
    it works great. Thanks.

    David
    FilterExpression="FileName Like '%{0}%'">

    <FilterParameters>

    <asp:ControlParameter Name="FileName" ControlId="txtFindName"
    PropertyName="Text"/>

    </FilterParameters>
     
    David, Apr 19, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Random

    2.0 FilterParameters bug

    Random, Jun 7, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    539
    Juan T. Llibre
    Jun 7, 2005
  2. Replies:
    1
    Views:
    7,580
    Markus
    Aug 25, 2005
  3. Andre

    FilterParameters

    Andre, Jan 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    696
    Andre
    Jan 10, 2006
  4. Bruno Alexandre

    problem in FilterParameters

    Bruno Alexandre, Apr 5, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,204
  5. David

    Multiple FilterParameters

    David, Apr 5, 2006, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    147
    Bruno Alexandre
    Apr 6, 2006
Loading...

Share This Page