Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6539297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:50:31+00:00 2026-05-25T10:50:31+00:00

I have uploaded some images using uploadify and saving the original file in uploads

  • 0

I have uploaded some images using uploadify and saving the original file in “uploads” folder and thumbnails in “uploads\thumbs” folder now what I need is I have a div element on the main.aspx page where I need to show thumbnail image.After clicking the thumbnail I need to give a lightbox effect to it.

1.I have done this way but this is showing me the original image instead of thumbnail.So how do I point to my thumbnail.

2.When Using Lightbox effect how do I manage my two Imagess with the below code.

This is my Handler code:

Public Class UploadVB : Implements IHttpHandler

    Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
        Dim postedFile As HttpPostedFile = context.Request.Files("Filedata")

        Dim savepath As String = ""
        Dim tempPath As String = ""
        tempPath = System.Configuration.ConfigurationManager.AppSettings("FolderPath")
        savepath = context.Server.MapPath(tempPath)
        Dim filename As String = postedFile.FileName
        If Not Directory.Exists(savepath) Then
            Directory.CreateDirectory(savepath)
        End If
        If Not Directory.Exists(savepath + "\thumbs") Then
            Directory.CreateDirectory(savepath +"\thumbs")
        End If


        postedFile.SaveAs((savepath & "\") + filename)
        Dim fullImage As System.Drawing.Image = New System.Drawing.Bitmap((savepath & "\") + filename)

        Dim newWidth As Integer = 200
        Dim newHeight As Integer = 200

        Dim temp As New Bitmap(newWidth, newHeight)
        Dim newImage As Graphics = Graphics.FromImage(temp)
        newImage.DrawImage(fullImage, 0, 0, newWidth, newHeight)
        temp.Save((savepath +"\thumbs"  & "\") + "t_" + filename)

        context.Response.Write((tempPath & "/") + filename)
        context.Response.StatusCode = 200



    End Sub

Here is my java script code:

<script type="text/javascript">
$(window).load(
function () {
    $("#Inputfile").fileUpload({
        'uploader': 'scripts/uploader.swf',
        'cancelImg': 'images/cancel.png',
        'buttonText': 'Browse Files',
        'script': 'UploadVB.ashx',
        'folder': 'uploads',
        'fileDesc': 'Image Files',
        'fileExt': '*.jpg;*.jpeg;*.gif;*.png',
        'queueSizeLimit':9999,
        'simUploadLimit': 2,
        'sizeLimit': 4000000,
        'multi': true,
        'auto': true,
        'onComplete': function (event, queueID, fileObj, response, data) {
            $("#Original").append('<img src="' + response + '"/>')

        },

        'onError': function (event, ID, fileObj, errorObj) {
            alert(errorObj.type + ' Error: ' + errorObj.info);
        }


    });
}
);

Here is what I need to show the Images:

<div id="Original">

</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:50:31+00:00Added an answer on May 25, 2026 at 10:50 am

    In this line

    context.Response.Write((tempPath & "/") + filename)
    

    you are referring to the main folder try something like:

    context.Response.Write((tempPath & "/thumbs/") + filename)
    

    As far as the light box effect, you can use some jQuery Plugin like jQuery Lightbox

    You can also create image tag in your handler and send it in response, if the plugin needs the path of both files. Then you can append the complete response to “Original” div.

    Edit:

    Instead of writing:

    context.Response.Write((tempPath & "/thumbs/") + filename)
    

    You can write:

    context.Response.Write("<a href='"+(tempPath & "/") + filename+"'><img src='"+(tempPath & "/thumbs/") + filename +"'/></a>")
    

    and in your script:

    $("#Original").append(response)
    

    It will link your thumbnail to your image. Finally, You’ll need to use Lightbox plugin can call its method

    $("#Original a").lightBox({fixedNavigation:true});
    

    which will create the lightbox effect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a server where I need to store some images. Now the images
I have some server code that is generating thumbnails when an image is uploaded.
I'm using Uploadify to upload some images with ASP.NET. I use Response.WriteFile() in ASP.NET
I have a problem. I upload some images from HDD to the website using
I have uploaded some files to a directory under public and I try to
I have just uploaded an image to imageshack using their API and I am
Currently I have an application that receives an uploaded file from my web application.
I have problem with Uploadify: I log in the project using: FormsAuthentication.SetAuthCookie(myName, false); Then,
I have images uploaded on the simulated sdcard on my emulator. I downloaded them
i am using this code to upload files(images to a folder) <form action='' method='POST'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.