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 7501517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:33:41+00:00 2026-05-29T20:33:41+00:00

In my page i’m trying to show two images which have the same id.

  • 0

In my page i’m trying to show two images which have the same id. For that, I have two image controls(imgX,imgY). To write the image to the image control I am using an HttpHandler(ashx).

My problem is that i’m getting the same image appending to both controls(imgX,imgY)

In page load event this is my code:

imgPhoto.ImageUrl = "Image.ashx?EmpBadge=" & Session("EmpBadge")
imgSign.ImageUrl = "Image.ashx?EmpBadge=" & Session("EmpBadge")

And in ashx:

  Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
        Try
            Dim imageId As String = context.Request.QueryString("EmpBadge")
            Dim drPhoto As SqlDataReader
            Dim param(1) As SqlParameter
            param(1) = New SqlParameter("@EmpBadge", imageId)
            drPhoto = IMSIndia.ExecuteReaderWithParam("SpGetPhotoAndSignature", param)
            If drPhoto.HasRows Then
                While drPhoto.Read()
                    context.Response.ContentType = "image/" & drPhoto("PhotoType")
                    context.Response.BinaryWrite(DirectCast(drPhoto("Photo"), Byte()))
                    context.Response.ContentType = "image/" & drPhoto("Signaturetype")
                    context.Response.BinaryWrite(DirectCast(drPhoto("Signature"), Byte()))
                End While
            End If
        Catch ex As Exception

        Finally
            If IMSIndia.con.State = ConnectionState.Open Then
                IMSIndia.ConnectionClose()
            End If
        End Try
    End Sub

Thanks.

  • 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-29T20:33:43+00:00Added an answer on May 29, 2026 at 8:33 pm

    Umm… of course you are getting the same image for each; you are passing exactly the same URL for each. You are using the same Session value for both.

    Then, in your code you seem to be trying to send two images within the same response. That makes no sense at all, to the point that I’m not sure if it’s related to this problem in the first place.

    You need to differ the image based on the QueryString value. Your handler can’t tell the difference unless you do.

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

Sidebar

Related Questions

page: http://jsbin.com/eniva4/edit I have one main div: #main-content which contains two div's : #announcement
Page has image with hyperlink and that hyperlink has target=_blank and every time i
Page contains four grid with same no of columns.so, i have created a usercontrol
Page speed suggests to give image height and width for the images , can
Page is refreshed every 5 seconds. Images that received from .php file are appended
Page has menu items that would replace a 'div id=foo_(current menu item)' with 'div
My page loads a TextView which is scrollable. Unfortunately the position appears to stick
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
That's pretty much it. I'm using Nokogiri to scrape a web page what has

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.