load image via vb code behind

Posted on 2007-10-09
Last Modified: 2012-06-27
Hi, I've got two simple lines of code.
<asp:Image ID="Image1" runat="server" />       in the aspx code

Image1.ImageUrl = oDataset.Tables(0).Rows.Item(0).Item("logo").ToString     in the vb code

This doesn't load the image.

How can I go about loading the image ?

Thanks in advance
Question by:Netlink2
    LVL 14

    Accepted Solution

    is your
    contains the QUALIFIED path of the image like
    http://doaminname/foldername/filename.jpg ?
    or is i just like /foldername/filename.jpg..
    just check the path of the image file and see whether it exists in that path !!
    LVL 2

    Assisted Solution

    FIrst how do you store the image path in the DB. RU storing the full path or just the filename. From ur query I presume it is inly the file name. THne u must give the virtual path of the image there

    Image1.ImageUrl = "/imagepath" & oDataset.Tables(0).Rows.Item(0).Item("logo").ToString (if ur image path is in the root)


    Image1.ImageUrl = "imagepath" & oDataset.Tables(0).Rows.Item(0).Item("logo").ToString (if ur image path and page is inside the same folder)

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    I have developed many web applications with asp & and to add and use a dropdownlist was always a very simple task, but with the new, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now