Do we need to create an HttpHandler(ashx) for each image?
<p>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).</p>

<p>My problem is that i'm getting the same image appending to both controls(imgX,imgY)</p>

<p>In page load event this is my code:</p>

<pre><code>imgPhoto.ImageUrl = "Image.ashx?EmpBadge=" &amp; Session("EmpBadge")
imgSign.ImageUrl = "Image.ashx?EmpBadge=" &amp; Session("EmpBadge")
</code></pre>

<p>And in ashx:</p>

<pre><code>  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/" &amp; drPhoto("PhotoType")
                    context.Response.BinaryWrite(DirectCast(drPhoto("Photo"), Byte()))
                    context.Response.ContentType = "image/" &amp; 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
</code></pre>

<p>Thanks.</p>
