Hi guys, does anybody use FancyBox JQuery popup here?
I encounter a weird problem when I combine Handler (.ashx) and FancyBox to display image. The image render correctly on the webpage, but not inside of the FancyBox JQuery popup.
Here is my code for the Handler (.ashx), is there anything wrong with it?
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data.SqlClient;
using System.Configuration;
namespace cK
{
///
/// Summary description for $codebehindclassname$
///
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class GetImage : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
HttpContext.Current.Response.ContentType = "image/jpeg";
HttpContext.Current.Response.WriteFile("test123.jpg");
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
NYCharles
Member
377 Points
95 Posts
Image Handler - image rendering problem in FancyBox JQuery popup
Aug 03, 2009 06:55 PM|LINK
Hi guys, does anybody use FancyBox JQuery popup here?
I encounter a weird problem when I combine Handler (.ashx) and FancyBox to display image. The image render correctly on the webpage, but not inside of the FancyBox JQuery popup.
Here is my code for the Handler (.ashx), is there anything wrong with it?
using System; using System.Data; using System.Web; using System.Collections; using System.Web.Services; using System.Web.Services.Protocols; using System.Data.SqlClient; using System.Configuration; namespace cK { /// /// Summary description for $codebehindclassname$ /// [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class GetImage : IHttpHandler { public void ProcessRequest(HttpContext context) { HttpContext.Current.Response.ContentType = "image/jpeg"; HttpContext.Current.Response.WriteFile("test123.jpg"); } public bool IsReusable { get { return false; } } } }