while (rd.Read())
<table style="width: 14%; position: relative; top: -182px; left: 630px; height: 117px;"> <tr> <td> <asp:Image ID="Image1" runat="server" Height="102px" Width="114px" visible="true"/> </td> </tr> </table>
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text=Request.QueryString["Parameter"].ToString();
OleDbConnection cn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\user\\Documents\\EmpDB.accdb");
OleDbCommand cmd = new OleDbCommand("select * from Emp where ID= @imgID ", cn);
OleDbParameter para1 = new OleDbParameter("@imgID", OleDbType.VarChar);
para1.Value = Label1.Text;
cmd.Parameters.Add(para1);
cn.Open();
OleDbDataReader rd = cmd.ExecuteReader();
while (rd.Read())
{
Label2.Text = rd["name"].ToString();
Label3.Text = rd["desig"].ToString();
Label4.Text = rd["phone"].ToString();
Label5.Text = rd["email"].ToString();
Label6.Text = rd["address"].ToString();
Label7.Text = rd["dob"].ToString();
Label8.Text = rd["quali"].ToString();
Image1.ImageUrl = System.Web.VirtualPathUtility.ToAbsolute(rd["image"].ToString());
// string b= System.Web.VirtualPathUtility.ToAbsolute(Image1.ImageUrl);
// string imgpath="http://localhost:3773/Images/"+b;
}
rd.Close();
cn.Close();
// Response.Write(imgpath);
// Image1.DataBind();
}
Label2.Text = rd["name"].ToString();
Label3.Text = rd["desig"].ToString();
Label4.Text = rd["phone"].ToString();
Label5.Text = rd["email"].ToString();
Label6.Text = rd["address"].ToString();
Label7.Text = rd["dob"].ToString();
Label8.Text = rd["quali"].ToString();
Image1.ImageUrl = System.Web.VirtualPathUtility.ToAbsolute(rd["image"].ToString());
// string b= System.Web.VirtualPathUtility.ToAbsolute(Image1.ImageUrl);
// string imgpath="http://localhost:3773/Images/"+b;
}
rd.Close();
cn.Close();
<table style="width: 14%; position: relative; top: -182px; left: 630px; height: 117px;"> <tr> <td> <asp:Image ID="Image1" runat="server" Height="102px" Width="114px" visible="true"/> </td> </tr> </table>