hi,
create a HttpHandler(ashx) page and write the following code in the handler file
public void ProcessRequest (HttpContext context)
{
int ID;
if (context.Request.QueryString["ID"] != null)
ID= Convert.ToInt32(context.Request.QueryString["ID"]);
else
throw new ArgumentException("No parameter specified");
byte[] imageData= ;
Response.ContentType = "image/jpeg";
Response.BinaryWrite(imageData);
}
and now the image control src will set like this:
<asp:image id="imgTest" imageurl="myImage.ashx?ID=<someId>" xmlns:asp="#unknown" />
and little change in the config file
<httphandlers>
<add verb="*" path="img/*" type="DisplayImage" />
</httphandlers>