Inserting an image from an SQL in ASP NET WebMobile control

Discussion in 'ASP .Net Mobile' started by Nicolas, Jul 21, 2004.

  1. Nicolas

    Nicolas Guest

    How do I display an image into the image webmobile control when the image is
    stored in an SQL database as image type field

    I got a file (page1.aspx) with the control (img_logo2) and this call
    Me.img_logo2.ImageUrl = "StreamImage.aspx?ItemID=" & dbTable.Rows(0)("ID")

    Then I got this other file (page2.aspx) which return this

    iItem.SelectOne(Request.QueryString("ID"))

    Response.ContentType = "image/gif"

    Response.BinaryWrite(iItem.Photo1)

    I know that it get the information correctly but the image got the red cross
    instead of the image



    Thanks for the help
    Nicolas, Jul 21, 2004
    #1
    1. Advertising

  2. Nicolas

    Nicolas Guest

    I need to sleep a bit I was passing the wrong querystring ItemID where it
    should be ID
    Anyway now it is working fine
    Sorry
    "Nicolas" <> wrote in message
    news:...
    > How do I display an image into the image webmobile control when the image

    is
    > stored in an SQL database as image type field
    >
    > I got a file (page1.aspx) with the control (img_logo2) and this call
    > Me.img_logo2.ImageUrl = "StreamImage.aspx?ItemID=" & dbTable.Rows(0)("ID")
    >
    > Then I got this other file (page2.aspx) which return this
    >
    > iItem.SelectOne(Request.QueryString("ID"))
    >
    > Response.ContentType = "image/gif"
    >
    > Response.BinaryWrite(iItem.Photo1)
    >
    > I know that it get the information correctly but the image got the red

    cross
    > instead of the image
    >
    >
    >
    > Thanks for the help
    >
    >
    Nicolas, Jul 21, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. .Net Newbie
    Replies:
    0
    Views:
    301
    .Net Newbie
    Aug 24, 2004
  2. =?Utf-8?B?UCBvZiBEaHVtcA==?=

    Problem (Inserting records into sql server 2000 using asp.net)

    =?Utf-8?B?UCBvZiBEaHVtcA==?=, Aug 18, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    627
    =?Utf-8?B?UCBvZiBEaHVtcA==?=
    Aug 18, 2005
  3. dawg1998
    Replies:
    1
    Views:
    5,294
    bruce barker \(sqlwork.com\)
    Apr 19, 2006
  4. Bhavesh
    Replies:
    0
    Views:
    417
    Bhavesh
    Jul 16, 2007
  5. Bhavesh
    Replies:
    5
    Views:
    613
    Bhavesh
    Jul 18, 2007
Loading...

Share This Page