Hello Mr King..
Well you can check whether file is exist in its physical location or not...
if condition satisfied jst set the other image path which indicates No image found..
Here i sample code...
You can also hide the Image control...i mean make it visible false...but not looks pretty one.Show like space..
protected void grdtest_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Image imgCarPic = (Image)e.Row.FindControl("imgCarPic");
if (string.IsNullOrEmpty(imgCarPic.ImageUrl.ToString()))
{
imgCarPic.ImageUrl = "../images/NoImageSmall.jpg";
}
else
{
String strUploadedPicPath = Server.MapPath(imgCarPic.ImageUrl.ToString());
if (!System.IO.File.Exists(strUploadedPicPath))
{
imgCarPic.ImageUrl = "../images/NoImageSmall.jpg";
}
}
}
}
"A conclusion is where you got tired of thinking.
Be different. Think "
Remember to click “Mark as Answer” on the post If you get answer from my post(s) !
Thanks Guys
------------
Pushkar