locked
Hopefully a simple question RRS feed

  • Question

  • User111389746 posted

    Hey all,

    This is my first dive into the depths (in this case, the shallows) of imaging in asp.net.

    I'm just now getting started and I'm running into a problem. All I want to do, to start with, is display an image on an aspx form. I'm eventually going to try and incorporate some zoom functionality. But for now a simple display is all I want. I've been using this as a guide.

     Right now, within the page load, I'm simply trying to dim the image as a bitmap:

     <code>

    Dim strFilePath As String = "\\fayfiler\haguewoj\TESTINVOICE.jpg"
    Dim objimage As Bitmap = New Bitmap(strFilePath)
    objimage.Save(Response.OutputStream, ImageFormat.Jpeg)
    objimage.Dispose()

    </code>

    As soon as it runs the "Dim objimage As Bitmap = New Bitmap(strFilePath)" code, it errors out with the following ex.message: "Invalid Parameter Used". I don't get it.

     Can anyone tell me what I'm doing wrong/Not doing at all? I would really appreciate it.

     Thanks,

     Jonathan

    Wednesday, September 20, 2006 4:49 PM

All replies

  • User1279188884 posted

    The syntax is right but the problem is with strFilePath variable. Check the path again. Is the image in a file share??

    Saturday, October 7, 2006 11:55 PM