write now thier are two columns display Id and pdf display columns but i wnat to diaplay only pdf file columns. i dont want display Id columns .. So plz help me..
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string embed = "<object data=\"{0}{1}\" type=\"application/pdf\" width=\"500px\" height=\"500px\">";
embed += "If you are unable to view file, you can download from <a href = \"{0}{1}&download=1\">here</a>";
embed += " or download <a target = \"_blank\" href = \"http://get.adobe.com/reader/\">Adobe PDF Reader</a> to view the file.";
embed += "</object>";
int Data = Convert.ToInt32(e.Row.Cells[0].Text);
(e.Row.FindControl("ltEmbed") as Literal).Text = string.Format(embed, ResolveUrl("~/File.ashx?Id="), Data);
}
}