In the below code i have a image i have pass image url from codebehind but it is not displaying the image.
public string strName = "SV";
public string strFolder = "Documents";
string Imgdocname = SearchDoc.DocumentName;
string fileExt = System.IO.Path.GetExtension(Imgdocname);
fileExt = fileExt.ToLower();
if (fileExt == ".jpeg" || fileExt == ".jpg")
{
docimg.ImageUrl = "C:\\Search\\" + strName + "\\" + strFolder + "\\" + Imgdocname; //not working
docimg.Visible = true;
} else
{docimg.ImageUrl = "C:\\Search\\doc\\Documents\\image.jpeg"; //not working
}
<div ID="imgContainer" runat="server" style="width: 700px; height: 300px; overflow:auto; border: solid 1px black;
padding: 10px; margin-bottom: 5px;" >
<asp:Image ID="docimg" runat="server" />
</div>