Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ASP.NET通用处理程序(.ashx)生成的动态图像文件不使用JavaScript_Javascript_Asp.net - Fatal编程技术网

ASP.NET通用处理程序(.ashx)生成的动态图像文件不使用JavaScript

ASP.NET通用处理程序(.ashx)生成的动态图像文件不使用JavaScript,javascript,asp.net,Javascript,Asp.net,我已经下载了一个JQuery插件(fancyzoom.js),它可以在用户单击时放大图像 HTML标记如下所示: <img class="fancyzoom" src="images/myproduct.jpg" width="100px" alt='' /> 这是正确的。我可以缩放图像,但当我使用通用处理程序将图像标记更改为此时: <img class="fancyzoom" width="100px" src="ProductImage.ashx?productId=my

我已经下载了一个JQuery插件(fancyzoom.js),它可以在用户单击时放大图像

HTML标记如下所示:

<img class="fancyzoom" src="images/myproduct.jpg" width="100px" alt='' />
这是正确的。我可以缩放图像,但当我使用通用处理程序将图像标记更改为此时:

<img class="fancyzoom" width="100px" src="ProductImage.ashx?productId=myproduct" alt=''/>

,图像最初加载得很好,但单击该图像(假设要放大)不起作用。未检测到任何错误。
有什么解决方法吗?

我没有找到一种方法来配置FancyBoom以接受流式图像,因此我停止使用fancybox。使用此选项可以正常工作:

$(function () {
  $('img.fancybox').fancybox({'type':'image'});
});
$(function () {
  $('img.fancybox').fancybox({'type':'image'});
});