Still not working .. i will resend code to you
<%@ Page Title="Job Seekers | Easy Employment Services" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="job seekers.aspx.cs" Inherits="EMSWebsite.job_seekers" %>
<asp:Content ID="Content1" 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>
</div>
<asp:GridView ID="grd_job" CssClass="header" 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="white" />
<Columns>
<asp:TemplateField HeaderText="S.No" 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>
<br />
</asp:Content>
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Web.Services;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
namespace EMSWebsite
{
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();
}
}
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();
//Attribute to show the Plus Minus Button.
grd_job.HeaderRow.Cells[0].Attributes["data-class"] = "expand";
//Attribute to hide column in Phone.
grd_job.HeaderRow.Cells[1].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;
}
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");
}
}
}