Hi umiiiiiii,
I have checked your code and modified it. Refer the below code. You are missing the footable class for gridview.
Site1.master
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site1.master.cs" Inherits="Site1" %>
<%@ Register Src="Controls/Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="Controls/Footer.ascx" TagName="Footer" TagPrefix="uc2" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
<!-- Stylesheets -->
<link href="css/bootstrap.css" rel="stylesheet" />
<link href="css/revolution-slider.css" rel="stylesheet" />
<link href="css/style.css" rel="stylesheet" />
<!--Favicon-->
<link rel="shortcut icon" href="images/favicon.png" type="image/x-icon" />
<link rel="icon" href="images/favicon.png" type="image/x-icon" />
<!-- Responsive -->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<link href="css/responsive.css" rel="stylesheet" />
<!--[if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script><![endif]-->
<!--[if lt IE 9]><script src="js/respond.js"></script><![endif]-->
</head>
<body>
<form id="form1" runat="server">
<div class="page-wrapper">
<!-- Preloader -->
<%--<div class="preloader"></div>--%>
<uc1:Header ID="Header1" runat="server" />
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
<uc2:Footer ID="Footer1" runat="server" />
</div>
</form>
<!--End pagewrapper-->
<!--Scroll to top-->
<div class="scroll-to-top scroll-to-target" data-target=".main-header">
<span class="icon fa fa-long-arrow-up"></span>
</div>
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/revolution.min.js"></script>
<script src="js/jquery.fancybox.pack.js"></script>
<script src="js/jquery.fancybox-media.js"></script>
<script src="js/owl.js"></script>
<script src="js/wow.js"></script>
<!--Google Map APi Key-->
<script src="http://maps.google.com/maps/api/js?key="></script>
<script src="js/map-script.js"></script>
<!--End Google Map APi-->
<script src="js/script.js"></script>
</body>
</html>
job seekers.aspx
<%@ Page Title="Job Seekers | Easy Employment Services" Language="C#" MasterPageFile="~/Site1.master"
AutoEventWireup="true" CodeFile="job seekers.aspx.cs" Inherits="job_seekers" %>
<%--<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>--%>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-footable/0.1.0/css/footable.min.css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-footable/0.1.0/js/footable.min.js"></script>
<script type="text/javascript">
$(function () {
$('[id$=grd_job]').footable();
});
</script>
<style>
.header
{
background-image: url("images/025kd.jpg");
}
.h3
{
background-image: url("images/025kd.jpg");
margin-top: 20px;
color: white;
text-align: center;
font-size: 30px;
font-weight: bold;
}
.h5
{
background-image: url("images/025kd.jpg");
color: white;
text-align: center;
}
#contain
{
background-image: url("images/025kd.jpg");
width: 100%;
}
</style>
<hr style="height: 5px; margin: 0" />
<div class="rounded_corners" style="width: 95%; margin-left: 30px; margin-right: 60px">
<div class="container" id="contain">
<div class="col-lg-4">
</div>
<div class="col-lg-4">
<h3 class="h3">
Job Applicants</h3>
<h5 class="h5">
List of job seekers who have applied online.</h5>
</div>
<div class="col-lg-4">
<asp:Button runat="server" ID="btn_query" Text="View Queries" CssClass="btn_query"
OnClick="btn_query_Click" />
<asp:Button runat="server" ID="btn_logout" Text="Logout" CssClass="btn-search" OnClick="btn_logout_Click" />
</div>
</div>
<asp:GridView ID="grd_job" CssClass="header footable" runat="server" HeaderStyle-Height="70px"
HeaderStyle-ForeColor="orange" RowStyle-BackColor="#63AB62" AlternatingRowStyle-BackColor="#3D8B37"
RowStyle-ForeColor="white" AutoGenerateColumns="false" OnRowDataBound="grd_job_RowDataBound">
<EmptyDataRowStyle Font-Size="30px" Font-Bold="True" ForeColor="Black" />
<Columns>
<asp:TemplateField HeaderText="S.No" ItemStyle-Width="250px" ItemStyle-Font-Italic="true"
ItemStyle-Font-Bold="true" ItemStyle-Font-Size="14px" HeaderStyle-Font-Size="17px">
<ItemTemplate>
<%#Container.DataItemIndex+1 %>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="FName" HeaderText="First Name" ItemStyle-Font-Italic="true"
ItemStyle-Font-Bold="true" ItemStyle-Font-Size="14px" HeaderStyle-Font-Size="17px" />
<asp:BoundField DataField="LName" HeaderText="Last Name" ItemStyle-Font-Bold="true"
ItemStyle-Font-Italic="true" ItemStyle-Font-Size="14px" HeaderStyle-Font-Size="17px" />
<asp:BoundField DataField="Email" HeaderText="Email" ItemStyle-Font-Bold="true" ItemStyle-Font-Size="14px"
ItemStyle-Font-Italic="true" HeaderStyle-Font-Size="17px" />
<asp:BoundField DataField="HAddress" HeaderText="Address" ItemStyle-Font-Bold="true"
ItemStyle-Font-Size="14px" HeaderStyle-Font-Size="17px" ItemStyle-Font-Italic="true" />
<asp:BoundField DataField="City" HeaderText="City" ItemStyle-Font-Bold="true" ItemStyle-Font-Size="14px"
HeaderStyle-Font-Size="17px" ItemStyle-Font-Italic="true" />
<asp:BoundField DataField="PhoneNo" HeaderText="Phone Number" ItemStyle-Font-Bold="true"
ItemStyle-Font-Size="14px" HeaderStyle-Font-Size="17px" ItemStyle-Font-Italic="true" />
<asp:BoundField DataField="CreatedOn" HeaderText="Date Applied" ItemStyle-Font-Bold="true"
ItemStyle-Font-Size="14px" HeaderStyle-Font-Size="17px" ItemStyle-Font-Italic="true" />
<asp:TemplateField HeaderText="Resume" HeaderStyle-Font-Size="17px">
<ItemTemplate>
<asp:LinkButton ID="lnkDownloadResume" ToolTip="Download Resume" CommandArgument='<%# Eval("ID") %>'
runat="server" OnClick="lnkDownloadResume_Click"><img src="images/resumedownload.png" alt="View" style="height:35px" /></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="ID" HeaderStyle-Font-Size="17px">
<ItemTemplate>
<asp:LinkButton ID="lnkDownloadID" ToolTip="Download ID" CommandArgument='<%# Eval("ID") %>'
runat="server" OnClick="lnkDownloadID_Click"><img src="images/iddownload.png" alt="View" style="height:35px" /></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="SIN" HeaderStyle-Font-Size="17px">
<ItemTemplate>
<asp:LinkButton ID="lnkDownloadSIN" ToolTip="Download SIN" CommandArgument='<%# Eval("ID") %>'
runat="server" OnClick="lnkDownloadSIN_Click"><img src="images/sindownload.png" alt="View" style="height:45px;margin-top:10px" /></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="View / Delete" HeaderStyle-Font-Size="17px">
<ItemTemplate>
<asp:LinkButton ID="lnkView" CommandArgument='<%# Eval("ID") %>' OnClick="lnkView_Click"
CommandName="View" runat="server" ToolTip="View"><img src="images/view.png" alt="View" style="height:25px" /></asp:LinkButton>
<asp:LinkButton ID="lnkdelete" CommandArgument='<%# Eval("ID") %>' OnClick="lnkdelete_Click"
CommandName="Delete" runat="server" ToolTip="Delete"><img src="images/delete.png" alt="Delete" style="height:25px" /></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</div>
<br />
</asp:Content>
job seekers.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Data.SqlClient;
using System.Data;
public partial class job_seekers : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["username"] == null)
{
//Response.Redirect("~/login.aspx");
}
if (!IsPostBack)
{
BindData();
if (grd_job.Rows.Count > 0)
{
//Attribute to show the Plus Minus Button.
grd_job.HeaderRow.Cells[1].Attributes["data-class"] = "expand";
//Attribute to hide column in Phone.
//grd_job.HeaderRow.Cells[0].Attributes["data-hide"] = "phone";
grd_job.HeaderRow.Cells[2].Attributes["data-hide"] = "phone";
grd_job.HeaderRow.Cells[3].Attributes["data-hide"] = "phone";
grd_job.HeaderRow.Cells[4].Attributes["data-hide"] = "phone";
grd_job.HeaderRow.Cells[5].Attributes["data-hide"] = "phone";
grd_job.HeaderRow.Cells[6].Attributes["data-hide"] = "phone";
grd_job.HeaderRow.Cells[7].Attributes["data-hide"] = "phone";
grd_job.HeaderRow.Cells[8].Attributes["data-hide"] = "phone";
grd_job.HeaderRow.Cells[9].Attributes["data-hide"] = "phone";
grd_job.HeaderRow.Cells[10].Attributes["data-hide"] = "phone";
grd_job.HeaderRow.Cells[11].Attributes["data-hide"] = "phone";
//Adds THEAD and TBODY to GridView.
grd_job.HeaderRow.TableSection = TableRowSection.TableHeader;
}
}
}
private void BindData()
{
string conn = ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
SqlConnection con = new SqlConnection(conn);
SqlCommand com = new SqlCommand();
try
{
con.Open();
// Create a object of SqlCommand class
com.CommandType = CommandType.StoredProcedure;
com.CommandText = "fetchgriddata";
com.Connection = con;
grd_job.EmptyDataText = "No Records Found";
grd_job.DataSource = com.ExecuteReader();
grd_job.DataBind();
}
catch (Exception ex)
{
}
finally
{
con.Close();
}
}
protected void lnkDownloadResume_Click(object sender, EventArgs e)
{
Guid id = Guid.Parse((sender as LinkButton).CommandArgument);
//byte[] ResumeBytes;
string ResumeName, ResumeType;
string conn = ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
SqlConnection con = new SqlConnection(conn);
SqlCommand com = new SqlCommand();
try
{
// Create a object of SqlCommand class
com.CommandType = CommandType.StoredProcedure;
com.CommandText = "fetchresume";
com.Parameters.AddWithValue("@ID", id);
com.Connection = con;
con.Open();
using (SqlDataReader sdr = com.ExecuteReader())
{
sdr.Read();
//ResumeBytes = (byte[])sdr["ResumeData"];
ResumeType = sdr["ResumeType"].ToString();
ResumeName = sdr["ResumeName"].ToString();
}
Response.Clear();
Response.Buffer = true;
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = ResumeType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" + ResumeName + ResumeType);
//Response.BinaryWrite(ResumeBytes);
Response.Flush();
Response.End();
}
catch (Exception ex)
{
}
finally
{
con.Close();
}
}
protected void lnkDownloadID_Click(object sender, EventArgs e)
{
Guid id = Guid.Parse((sender as LinkButton).CommandArgument);
//byte[] IDBytes;
string IDName, IDType;
string conn = ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
SqlConnection con = new SqlConnection(conn);
SqlCommand com = new SqlCommand();
try
{
// Create a object of SqlCommand class
com.CommandType = CommandType.StoredProcedure;
com.CommandText = "fetchid";
com.Parameters.AddWithValue("@ID", id);
com.Connection = con;
con.Open();
using (SqlDataReader sdr = com.ExecuteReader())
{
sdr.Read();
//IDBytes = (byte[])sdr["IdData"];
IDType = sdr["IdType"].ToString();
IDName = sdr["IdName"].ToString();
}
Response.Clear();
Response.Buffer = true;
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = IDType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" + IDName + IDType);
//Response.BinaryWrite(IDBytes);
Response.Flush();
Response.End();
}
catch (Exception ex)
{
}
finally
{
con.Close();
}
}
protected void lnkDownloadSIN_Click(object sender, EventArgs e)
{
Guid id = Guid.Parse((sender as LinkButton).CommandArgument);
//byte[] SINBytes;
string SINName, SINType;
string conn = ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
SqlConnection con = new SqlConnection(conn);
SqlCommand com = new SqlCommand();
try
{
// Create a object of SqlCommand class
com.CommandType = CommandType.StoredProcedure;
com.CommandText = "fetchsin";
com.Parameters.AddWithValue("@ID", id);
com.Connection = con;
con.Open();
using (SqlDataReader sdr = com.ExecuteReader())
{
sdr.Read();
//SINBytes = (byte[])sdr["SinData"];
SINType = sdr["SinType"].ToString();
SINName = sdr["SinName"].ToString();
}
Response.Clear();
Response.Buffer = true;
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = SINType;
Response.AppendHeader("Content-Disposition", "attachment; filename=" + SINName + SINType);
//Response.BinaryWrite(SINBytes);
Response.Flush();
Response.End();
}
catch (Exception ex)
{
}
finally
{
con.Close();
}
}
protected void lnkView_Click(object sender, EventArgs e)
{
Session["ID"] = Guid.Parse((sender as LinkButton).CommandArgument);
Response.Redirect("~/viewdata.aspx");
}
protected void lnkdelete_Click(object sender, EventArgs e)
{
string conn = ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
SqlConnection con = new SqlConnection(conn);
SqlCommand com = new SqlCommand();
try
{
con.Open();
Session["ID"] = Guid.Parse((sender as LinkButton).CommandArgument);
string s = " delete from tb_JobApply where ID ='" + Session["ID"].ToString() + "'";
SqlDataAdapter da = new SqlDataAdapter(s, con);
DataSet ds = new DataSet();
da.Fill(ds, "ss");
grd_job.DataSource = ds.Tables["ss"];
grd_job.DataBind();
BindData();
ds.Dispose();
da.Dispose();
}
catch (Exception ex)
{
}
finally
{
con.Close();
}
}
protected void grd_job_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton l = (LinkButton)e.Row.FindControl("lnkdelete");
l.Attributes.Add("onclick", "javascript:return " + "confirm('Are you sure you want to delete " + DataBinder.Eval(e.Row.DataItem, "FName") + "')");
}
}
protected void btn_logout_Click(object sender, EventArgs e)
{
Session.RemoveAll();
Response.Redirect("~/login.aspx");
}
protected void btn_query_Click(object sender, EventArgs e)
{
Response.Redirect("~/queries.aspx");
}
}
Screenshot
