I have to display image dynamically. I have written code for that, i got the name of the image & path also from database i.e Filename & filepath which i stored earlier, but I didnt get image(not displaying image even i stored path of that image). Please give me idea about how to set imageurl of image here on local host. My code is as follow:
//PlaceHolder for adding images i.e inside formview control
PlaceHolder PHFilename = (PlaceHolder)FVViewCustData.FindControl("PHFilename");
for (int i = 0; i < dsfile.Tables[0].Rows.Count; i++)
{
HyperLink hypname = new HyperLink();
hypname.Text = Convert.ToString(dsfile.Tables[0].Rows[i]["FileName"]);
PHFilename.Controls.Add(hypname);
Image img = new Image();
//IPAddress is my ipaddress
img.ImageUrl = "IPAddress" + Convert.ToString(
dsfile.Tables[0].Rows[i]["FilePath"]);
PHFilename.Controls.Add(img);
}