L
luci
Hi,
i'm writing a pice of code to fill the image control (in asp.net page)
with a image uploaded on the server.
The way I used is this:
protected void cmdUpload_Click(object sender, EventArgs e)
{
thumbUpload.SaveAs(Server.MapPath("/public/news/_tmp_news.jpg"));
System.Drawing.Image largeImg =
System.Drawing.Image.FromFile(Server.MapPath("/public/news/_tmp_news.jpg"));
System.Drawing.Image thumbImg =
largeImg.GetThumbnailImage(120, 120, null, IntPtr.Zero);
largeImg.Dispose();
thumbImg.Save(Server.MapPath("/public/news/_tmp_news.jpg")); //Resave
the thumb
thumbImg.Dispose();
imgThumb.ImageUrl = "/public/news/_tmp_news.jpg";
....................
Why when i try to upload again a new image the images don't change?
The image control always show the first image i uploaded, (in cache?)
DUNNO!
i'm writing a pice of code to fill the image control (in asp.net page)
with a image uploaded on the server.
The way I used is this:
protected void cmdUpload_Click(object sender, EventArgs e)
{
thumbUpload.SaveAs(Server.MapPath("/public/news/_tmp_news.jpg"));
System.Drawing.Image largeImg =
System.Drawing.Image.FromFile(Server.MapPath("/public/news/_tmp_news.jpg"));
System.Drawing.Image thumbImg =
largeImg.GetThumbnailImage(120, 120, null, IntPtr.Zero);
largeImg.Dispose();
thumbImg.Save(Server.MapPath("/public/news/_tmp_news.jpg")); //Resave
the thumb
thumbImg.Dispose();
imgThumb.ImageUrl = "/public/news/_tmp_news.jpg";
....................
Why when i try to upload again a new image the images don't change?
The image control always show the first image i uploaded, (in cache?)
DUNNO!