使用花哨的框和HttpHandler的加载图像 [英] using fancy box and httphandler to load images

查看:158
本文介绍了使用花哨的框和HttpHandler的加载图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用JQuery的fancybox的照片。我想加载使用的HttpHandler从数据库中的图像,但不能获得图像。
我的code为jQuery的

I am using JQuery fancybox for photos. I want to load the images from database using HttpHandler but can not get the image. my code for the jquery

$(document).ready(function(){
 $('#gallery a').fancybox();
});

asp.net code

asp.net code

 <div style="float:left; position:relative; margin:10px;" id="gallery">
  <div>
   <a href="ImageHandlerFullSize.ashx?ImID=<%# Eval("Id")%>" rel="gallery" >
   <asp:Image ID="Image1" runat="server" ImageUrl='<%#"ImageHandler.ashx?ImID="+    Eval("Id") %>'  BorderStyle="Solid" BorderWidth="1px" Width="172px"  Height="172px"/>
    </a>

  </div>

它加载的fancybox,但只显示 System.Data这[] 而不是显示的消息。
谢谢你。

it loads the fancybox but just displays "System.Data[]" instead showing the message. Thanks.

推荐答案

尝试

$(document).ready(function(){
 $('#gallery a').fancybox({
  "type":"image"
 });
});

http://fancybox.net/faq 为6号... v1.3.x或 http://fancyapps.com/fancybox/#support 为5号V2.X

check http://fancybox.net/faq No.6 for v1.3.x ... or http://fancyapps.com/fancybox/#support No.5 for v2.x

这篇关于使用花哨的框和HttpHandler的加载图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆