Example #1
0
 public ActionResult EmployeeImage()
 {
     if (Request.QueryString[GridViewDemosHelper.ImageQueryKey] != null)
     {
         int employeeId = int.Parse(Request.QueryString[GridViewDemosHelper.ImageQueryKey]);
         Response.ContentType = "image";
         Binary photo = NorthwindDataProvider.GetEmployeePhoto(employeeId);
         if (photo != null)
         {
             Response.BinaryWrite(photo.ToArray());
         }
         Response.End();
     }
     return(null);
 }