Not able to display an image in repeater control for [thumbnail images]
<p>hi
 i have  imgae path  in datatable[id, path]  now this  would  a  value like</p>

<pre><code>ex: id   path
    1    F:\R&amp;D\RD\RD\Images\a1.JPG;
    2    F:\R&amp;D\RD\RD\Images\a2.JPG;
    3    F:\R&amp;D\RD\RD\Images\a3.JPG;
</code></pre>

<p>now these  images  are in  size width*height (1018*768). now i need  to  convert these  images  into thumnail</p>

<p>caling the  function </p>

<pre><code>**C_Thumbnails(100, "F:\R&amp;D\RD\RD\Images\a1.JPG", "F:\R&amp;D\RD\RD\Images]thum.jpg")**
public static void C_Thumbnails(int size, string FilePath, string ThumbPath)
        {

            System.Drawing.Image image = System.Drawing.Image.FromFile(FilePath);

            try
            {
                int thumbHeight, thumbWidth;

                decimal h = image.Height;

                decimal w = image.Width;

                if (image.Height &gt; image.Width)
                {

                    thumbHeight = size;

                    decimal tWidth = (w / h) * thumbHeight;

                    thumbWidth = Convert.ToInt32(tWidth);

                }

                else
                {

                    thumbWidth = size;

                    decimal tHeight = (h / w) * thumbWidth;

                    thumbHeight = Convert.ToInt32(tHeight);

                }
                System.Drawing.Image thumbnailImage = image.GetThumbnailImage(thumbWidth, thumbHeight, null, IntPtr.Zero);
                image.Dispose();
                thumbnailImage.Save(ThumbPath, System.Drawing.Imaging.ImageFormat.Jpeg);

            }

            catch (Exception ex)
            {
                image.Dispose();
                throw ex;
            }

        }
</code></pre>

<p>like this   i am  coverting into  thumbnail image. but here i am   saving the thumbnail image  under  the path  <strong>F:\R&amp;D\RD\RD\Images\thum.jpg</strong> .</p>

<p>so is there any way without saving the  thumbnail in the <strong>disk</strong>    and how to  bind the  new thumbnail image in the  repeater  control   and i need to  show  image there. but if once user  clicks on the  thumnail image a  orignal image  should pop up.</p>

<p>if any one  have  did  this  functionlity any where  let me know
  working on this  solution from past  2 days.
 any help  would  be greatly appreciated</p>

<p><strong>now after  changing code</strong>
like  this</p>

<pre><code>public void ProcessRequest(HttpContext context)
    {
        string imageid = context.Request.Params["ImageID"];
        string thumbnail = context.Request.Params["thumbnail"];
        SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["connectionString"].ConnectionString);
        connection.Open();
        SqlCommand command = new SqlCommand("select Image from Image where ImageID=" + imageid, connection);
        SqlDataReader dr = command.ExecuteReader();
        dr.Read();

        string filePath = dr["image"].ToString();
        dr.Close();

        if (!System.IO.File.Exists(filePath))
        {
            //you have a problem 
            return;
        }
        if (context.Request.Params["thumbnail"] == "true")
        {
            //TODO: the thumbnail
            // Image thumbnailImage = originalImage.GetThumbnailImage to generate thumbnail then
            Response.ClearContent();
            Response.ClearHeaders();
            Response.ContentType = "image/" + format;
            thumbnailImage.Save(Response.OutputStream, imageFormat);
            thumbnailImage.Dispose();

        }
        else
        { //stream directly the image fromdisk
            System.IO.FileStream fs = System.IO.File.OpenRead(filepath);
            const int ChunkSize = 10000;
            Byte[] buffer = new Byte[ChunkSize];
            long dataLengthToRead = fs.Length;

            while (dataLengthToRead &gt; 0)
            {
                int lengthRead = fs.Read(buffer, 0, ChunkSize);
                Response.OutputStream.Write(buffer, 0, lengthRead);
                System.Web.HttpContext.Current.Response.Flush();
                dataLengthToRead = dataLengthToRead - lengthRead;
            }
            fs.Close();
        }
    }


}
</code></pre>

<p>in repeater control  i have added  this line  of code
  
                   ','_blank','toolbar=no,menubar=no'))" > '/> 
                 
   my thumbnail image is  not  displayed  still but once i click my thumbnail image i   am  able to see the entire image in new pop  up   </p>
