Hi,
Try in row databound event like this, and remove ImageUrl attribute from page source.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType==DataControlRowType.DatRow)
{
string id = ((Label)e.Row.FindControl("lblID")).Text;
((Image)e.Row.FindControl("Image1")).ImageUrl="Handler1.ashx?ID=" + id +";
}
}
hope it works.