You should use an HttpHandler to show the images.
Googling for "httphandler images" turns up numerous examples on how to do this.
Instead of trying to link directly to you images, you would link to the handler with the querystring determining which image to show. eg
http://mysite.com/MyHandler.ashx?image=myimage.jpg
Here's a very basic sample (minus error handling etc)
using System.IO;
using System.Web;
public class MyImageHandler : IHttpHandler
{
public void ProcessRequest(System.Web.HttpContext ctx)
{
string _Path;
_Path = "E:\XYZ\11-01-01 New Year" + context.Request.QueryString["image"];
ctx.Response.StatusCode = 200;
ctx.Response.ContentType = "image/jpeg";
ctx.Response.WriteFile(_Path);
}
public bool IsReusable { get {return true; } }
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…