Click here to Skip to main content
16,021,125 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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:

XML
<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
Posted

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900