adding thumbnail to gridview
<p>I have been struggling for a while to add a thumbnail of an image to a gridview so that the image can be displayed as a smaller version of the original.</p>

<p>I am still in the process of learning C# coding and was hoping I could receive some help. I managed to upload the picture and even to display the picture but getting it to thumnail size is problematic.</p>

<p>I will insert some code as one of numerous attempts(all of which returns errors)</p>

<p>kind regards</p>

<pre><code>if (upImage.HasFile)
    {
        try
        {
            string filename = Path.GetFileName(upImage.FileName);
            //****************************************************

            System.Drawing.Image sourceImage = System.Drawing.Image.FromFile(Server.MapPath("~/") + filename);

            System.Drawing.Image thumbNail = sourceImage.GetThumbnailImage(70, 70, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);

            thumbNail.Save(Path.ChangeExtension(filename, "thumb"));

            upImage.SaveAs(Server.MapPath("~/") + filename);


            //upImage.SaveAs(Server.MapPath("~/") + filename);
            lblUpload.Text = "Upload status: File uploaded!";
        }
        catch (Exception ex)
        {
            lblUpload.Text = "Upload status: The file could not be uploaded. The following error occured: " + ex.Message;
        }
    }

public bool ThumbnailCallback()
{
    return true;
}
</code></pre>
