Hi, I am making a webform in which a client will search his Data, for that i use Ajax tabpanel and for showing result i am using Gridview, i also has make the dataSource in gridview and bind the data. But problem is that its not showing Gridview in ajax tab panel. Kindly tell me whats the problem behind that i am sending my Code also
<cc1:TabContainer ID="TabContainer2" runat="server" AutoPostBack="true">
<cc1:TabPanel ID="TabPanel3" runat="server">
<HeaderTemplate>
Search By IEMI
<HeaderTemplate>
<ContentTemplate>
<table>
<tr>
<td>IEMI / SER</td>
<td><asp:TextBox ID="txtSearchIEMI" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Brand</td>
<td><asp:TextBox ID="txtSearchBrand" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Model</td>
<td><asp:TextBox ID="txtSearchModel" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td></td>
<td><asp:Button ID="Button3" runat="server" Text="Search" OnClick="btnSearch_Click" /></td>
</tr>
</table>
<hr />
<asp:GridView ViewStateMode="Enabled" ID="gvSearchIEMI" runat="server" Visible="true">
</asp:GridView>
</ContentTemplate>
</cc1:TabPanel>
</cc1:TabContainer>
And that is my Code Behind page.cs
protected void btnSearch_Click(object sender, EventArgs e)
{
gvSearchIEMI.DataSource = csSearch.Searh_by_IEMI(txtSearchIEMI.Text,
txtSearchBrand.Text, txtSearchModel.Text);
gvSearchIEMI.DataBind();
}
and for the Database Query i am using BLL and this is my Query in .cs
public static DataSet Searh_by_IEMI(string IEMI, string Brand, string Model)
{
string query = String.Format(@"Select [S.No] as S.No, IEMI, Brand, Model, Price, Date,
Warranty, Company, Cost from tbl_mobile WHERE IEMI = '{0}' AND Brand = '{1}' AND Model =
'{2}'", IEMI, Brand, Model);
return DAL.SelectQuery(query);
}