Hi indradeo,
Refer below sample.
Database
This article makes use of a table named Files whose schema is defined as follows.

HTML
<asp:DataList ID="DataList1" runat="server">
<ItemTemplate>
<asp:LinkButton Text='<%# Eval("Path") %>' runat="server" OnClick="OpenFrame" />
</ItemTemplate>
</asp:DataList>
<br />
<asp:Literal ID="ltEmbed" runat="server" />
Namespaces
C#
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
VB.Net
Imports System.Data.SqlClient
Imports System.Data
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
using (SqlConnection con = new SqlConnection(constr))
{
using (SqlCommand cmd = new SqlCommand("SELECT TOP 4 Id, Name, Path from tblfilespath", con))
{
using (SqlDataAdapter da = new SqlDataAdapter(cmd))
{
DataTable dt = new DataTable();
da.Fill(dt);
DataList1.DataSource = dt;
DataList1.DataBind();
}
}
}
}
}
protected void OpenFrame(object sender, EventArgs e)
{
LinkButton lnk = (sender) as LinkButton;
string embed = "<object data=\"{0}\" type=\"application/pdf\" width=\"500px\" height=\"300px\">";
embed += "If you are unable to view file, you can download from <a href = \"{0}\">here</a>";
embed += " or download <a target = \"_blank\" href = \"http://get.adobe.com/reader/\">Adobe PDF Reader</a> to view the file.";
embed += "</object>";
ltEmbed.Text = string.Format(embed, lnk.Text);
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
If Not Me.IsPostBack Then
Dim constr As String = ConfigurationManager.ConnectionStrings("constr").ConnectionString
Using con As SqlConnection = New SqlConnection(constr)
Using cmd As SqlCommand = New SqlCommand("SELECT Id, Name, Path from tblfilespath", con)
Using da As SqlDataAdapter = New SqlDataAdapter(cmd)
Dim dt As DataTable = New DataTable()
da.Fill(dt)
DataList1.DataSource = dt
DataList1.DataBind()
End Using
End Using
End Using
End If
End Sub
Protected Sub OpenFrame(ByVal sender As Object, ByVal e As EventArgs)
Dim lnk As LinkButton = TryCast((sender), LinkButton)
Dim embed As String = "<object data=""{0}"" type=""application/pdf"" width=""500px"" height=""300px"">"
embed += "If you are unable to view file, you can download from <a href = ""{0}"">here</a>"
embed += " or download <a target = ""_blank"" href = ""http://get.adobe.com/reader/"">Adobe PDF Reader</a> to view the file."
embed += "</object>"
ltEmbed.Text = String.Format(embed, lnk.Text)
End Sub
Screenshot
