title: Why isn't my search with Control Parameters returning integer values?
body: <p>I am searching a grid view using control parameters, but in my code I search only for text instead of integer values.</p>
  
  <p>How can I search for integer values using control parameters?</p>
  
  <p>My code is: </p>
  
  <pre><code>   &lt;%@ Page Language="VB" AutoEventWireup="false" CodeFile="GridviewwithHighlightedSearch.aspx.vb"
  Inherits="GridviewwithHighlightedSearch" MasterPageFile="~/Default.master" %&gt;
  
    &lt;asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderMain" runat="Server"&gt;
    &lt;style type="text/css"&gt;
        .highlight {text-decoration: none;color:black;background:yellow;}
    &lt;/style&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;asp:ScriptManager ID="ScriptManager" runat="server" /&gt;
    &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"&gt;
      &lt;ContentTemplate&gt;
          &lt;h3&gt;
              Gridview with Highlighted Search&lt;/h3&gt;
          &lt;div class="GridviewDiv"&gt;
              &lt;p&gt;
                  Search for a person :
                  &lt;asp:TextBox ID="txtSearch" runat="server" /&gt;&amp;nbsp;&amp;nbsp;
                  &lt;asp:ImageButton ID="btnSearch" ImageUrl="images/searchbutton.png" runat="server"
                      Style="top: 5px; position: relative" /&gt;&amp;nbsp;&amp;nbsp;
                  &lt;asp:ImageButton ID="btnClear" ImageUrl="images/clearbutton.png" runat="server" Style="top: 5px;
                      position: relative" /&gt;&lt;br /&gt;
                  &lt;br /&gt;
              &lt;/p&gt;
              &lt;asp:GridView ID="Gridview1" runat="server" AutoGenerateColumns="False" AllowPaging="True"
                  AllowSorting="true" DataSourceID="dsGridview" Width="540px" PageSize="10" CssClass="Gridview"&gt;
                  &lt;Columns&gt;
                      &lt;asp:BoundField DataField="id" HeaderText="ID" SortExpression="id" ItemStyle-Width="40px"
                          ItemStyle-HorizontalAlign="Center" /&gt;
                      &lt;asp:TemplateField HeaderText="First Name" SortExpression="FirstName"&gt;
                          &lt;ItemStyle Width="120px" HorizontalAlign="Left" /&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:Label ID="lblFirstname" Text='&lt;%# HighlightText(Eval("FirstName")) %&gt;' runat="server"
                                  CssClass="TextField" /&gt;
                          &lt;/ItemTemplate&gt;
                      &lt;/asp:TemplateField&gt;
                      &lt;asp:TemplateField HeaderText="Last Name" SortExpression="LastName"&gt;
                          &lt;ItemStyle Width="120px" HorizontalAlign="Left" /&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:Label ID="lblLastname" Text='&lt;%# HighlightText(Eval("LastName")) %&gt;' runat="server"
                                  CssClass="TextField" /&gt;
                          &lt;/ItemTemplate&gt;
                      &lt;/asp:TemplateField&gt;
                      &lt;asp:BoundField DataField="Department" HeaderText="Department" SortExpression="Department"
                          ItemStyle-Width="130px" /&gt;
                      &lt;asp:BoundField DataField="Location" HeaderText="Location" SortExpression="Location"
                          ItemStyle-Width="130px" /&gt;
                  &lt;/Columns&gt;
              &lt;/asp:GridView&gt;
              &lt;/div&gt;
      &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  &lt;br /&gt;
  &lt;a href="GridviewwithHighlightedSearch.zip"&gt;Download Source Code&lt;/a&gt; 
  &lt;asp:SqlDataSource ID="dsGridview" runat="server" ConnectionString="&lt;%$ ConnectionStrings:EvonetConnectionString %&gt;"
      SelectCommand="SELECT * FROM [T_Employees]" FilterExpression="firstname like '%{0}%' or lastname like '%{1}%'"&gt;
      &lt;FilterParameters&gt;
          &lt;asp:ControlParameter Name="firstname" ControlID="txtSearch" PropertyName="Text" /&gt;
          &lt;asp:ControlParameter Name="lastname" ControlID="txtSearch" PropertyName="Text" /&gt;
      &lt;/FilterParameters&gt;
  &lt;/asp:SqlDataSource&gt;
  &lt;/form&gt;
  &lt;/asp:Content&gt;
  </code></pre>