如何在Asp.net中实现Fancybox [英] How to implement Fancybox in Asp.net

查看:52
本文介绍了如何在Asp.net中实现Fancybox的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个asp.net项目,我正在使用文件上载器控件上载图像,我具有预览按钮来预览图像.我想在预览图像上使用fancybox.我的预览图像正在工作,代码如下.请帮我...

aspx:

I have an asp.net project, i am using file uploader control to upload images, i have preview button to preview the image.i want to use fancybox on the preview image.my preview image is working , code is below. please help me...

aspx:

<asp:FileUpload ID="QuestionUp" runat="server" onchange="" CssClass ="Fileupload"  />
                                       <div>
                                           <asp:Image ID="Image2" runat="server" Height="26px" Width="222px" />
                                       </div>





vb:





vb:

Protected Sub btnPreview_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        QuestionUp.SaveAs(Server.MapPath("~/UploadImg/Preview/test.jpg"))
        Image2.ImageUrl = "~/UploadImg/Preview/test.jpg"
        Image2.Visible = True




End Sub




End Sub

推荐答案

fancybox是一个jquery/客户端操作.您正在使用在服务器上运行的click事件.我在这里看不到任何用于运行fancybox的代码.
A fancybox is a jquery/client side operation. You''re using a click event, which runs on the server. I don''t see any code here to run a fancybox.


这篇关于如何在Asp.net中实现Fancybox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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