<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<div id="GridviewDiv">
<p>
Enter UserName :
<asp:TextBox ID="txtSearch" runat="server" />
<asp:ImageButton ID="btnSearch" ImageUrl="~/SearchButton.png" runat="server"
Style="top: 5px; position: relative" OnClick="btnSearch_Click" />
<asp:ImageButton ID="btnClear" ImageUrl="~/Clearbutton.png" runat="server" Style="top: 5px; position: relative"
OnClick="btnClear_Click" /><br />
<br />
</p>
<asp:GridView ID="gvDetails" runat="server" Width="332px" AllowPaging="true" AllowSorting="true"
AutoGenerateColumns="false" CssClass="Gridview" PageSize="3" DataSourceID="dsDetails">
<HeaderStyle BackColor="#df5015" />
<Columns>
<asp:TemplateField HeaderText="Name">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Name")%>'>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="City">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("City")%>'>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Sex">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#Eval("Sex")%>'>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="dsDetails" runat="server" ConnectionString="<%$ConnectionStrings:connect %>" SelectCommand="select * from emp" FilterExpression="Name LIKE '%{0}%'">
<FilterParameters>
<asp:ControlParameter Name="Name" ControlID="txtSearch" PropertyName="Text" />
</FilterParameters>
</asp:SqlDataSource>
</div>
</ContentTemplate>
</asp:UpdatePanel>