示例#1
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                Image  image = null;
                byte[] bytes;
                int    locationId = int.Parse(context.Request["locationid"]);

                image = ClassFunctions.GetLocationImage(locationId);

                context.Response.ContentType = image.ContentType;
                context.Response.BinaryWrite(image.Bytes);
            }
            catch (Exception ex)
            {
                context.Response.StatusCode = 500;
                context.Response.Write("Error occurred on server " +
                                       ex.Message);
            }
        }