title: FilterExpression search bar - multiple data types (int and varchar)
body: <p>I have a textbox that I want to make into a search bar. My table has an int "id" and varchar(50) "name". I want to search for either the name or the id in the same textbox. Is that even possible? I've tried many things but haven't gotten to a solution yet.</p>
  
  <p>Here's what I have:</p>
  
  <pre><code>&lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" 
   ConnectionString="&lt;%$ ConnectionStrings:New_QuickBooksConnectionString %&gt;"      
          SelectCommand="SELECT * FROM [Testing1]" FilterExpression="([id] = {0}) OR ([name] LIKE     '%(CAST {0} AS VARCHAR(50))%')"&gt;
  &lt;FilterParameters&gt;
   &lt;asp:ControlParameter ControlID="TextBox1" Name="id" PropertyName="Text" Type="int32" /&gt;
  &lt;/FilterParameters&gt;
  &lt;/asp:SqlDataSource&gt; 
  </code></pre>
  
  <p>This just returns the id when I type in a number. It doesn't work for name. What can I do?</p>