Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7076505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:18:22+00:00 2026-05-28T06:18:22+00:00

I am trying to perform a single search on a single column of data

  • 0

I am trying to perform a single search on a single column of data in an asp:GridView, however I want multiple filter (search) boxes above each column so one could search within its own perspective column. What would clearly fix this theoretically is to have multiple FilterExpressions. I am using VB and am very new and easily misunderstood with VB, please bare with:

PS. I have gotten it to work no problem when only having ONE filter (search) box, this currently doesn’t do anything

<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="xxx" 
    ProviderName="xxxx" 
    SelectCommand="SELECT [ddiID], [volusionID], [Customer], [email], [Total], [SumOfTotal] FROM [BBnewsalesQry] ORDER BY [Customer]"
    FilterExpression="customer like '%{0}%' OR ddiID like '%{0}%'">
      <FilterParameters>
         <asp:ControlParameter Name="ddiID" ControlID="ddiIDSearch" PropertyName="Text" />
         <asp:ControlParameter Name="customer" ControlID="txtSearch" PropertyName="Text" />
      </FilterParameters>
</asp:SqlDataSource>
<div>
   <b>DDI Search:</b> <asp:TextBox ID="ddiIDSearch" runat="server" />
   <b>Customer Search:</b> <asp:TextBox ID="txtSearch" runat="server" />
   <asp:ImageButton ID="btnSearch" ImageUrl="http:xxx" runat="server" />
   <asp:ImageButton ID="btnClear" ImageUrl="http:xxx" runat="server" />
</div>

Then inside the GridView:

<asp:TemplateField HeaderText="ddiID" SortExpression="ddiID">
        <ItemStyle HorizontalAlign="Left" />
           <ItemTemplate>
              <asp:Label ID="lblddiid" Text='<%#HighlightText(Eval("ddiid")) %>' 
                        CssClass="TextField" runat="server" />
           </ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="volusionID" HeaderText="volusionID" ReadOnly="True" SortExpression="volusionID" />
<asp:TemplateField HeaderText="customer" SortExpression="customer">
         <ItemStyle HorizontalAlign="Left" />
           <ItemTemplate>
              <asp:Label ID="lblcustomer" Text='<%#HighlightText(Eval("customer")) %>' 
                        CssClass="TextField" runat="server" />
           </ItemTemplate>
</asp:TemplateField>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:18:23+00:00Added an answer on May 28, 2026 at 6:18 am

    you are referencing the same parameter twice – try the following:

    FilterExpression="customer like '%{0}%' OR ddiID like '%{1}%'"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to perform a single boolean NOT operation, it appears that under MS SQL
I am trying to perform some benchmarks in some graph data structures in C++
I am trying to perform two different SUMs within a single query. user points
I'm trying to add a single column in a db query result. I've read
I'm trying to create a code for a single button where it will perform
How do I perform a DISTINCT operation on a single column after a UNION
I am trying to search a single whole word through a textbox. Say I
I'm trying to perform date manipulations using JavaScript on a single line, and I'm
I'm trying to perform a CONTAINS query with multiple terms over multiple columns, like
I am certain this is non-conventional, however I am trying to perform the following:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.