Try this:
((System.Web.UI.WebControls.Image)(GridView2.Rows[0].Cells[0].Controls[0])).ImageUrl = "~/createthumb.ashx?gu=/pics/gmustang06_2.jpg";
EDIT:
You can set the URL of the path to an image that will be displayed in the image control with declarative syntax:
<asp:ImageField DataImageUrlField="id" DataImageUrlFormatString="img{0}.jpg"></asp:ImageField>
or in the Code Behind by handling the OnRowDataBound event of the GridView control:
protected void grd_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Image img = e.Row.Cells[0].Controls[0] as Image;
img.ImageUrl = "img" + DataBinder.Eval(e.Row.DataItem, "id") + ".jpg";
}
}