Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


load image via vb code behind

Posted on 2007-10-09
Medium Priority
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

Jai S earned 1600 total points
ID: 20046475
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 !!

Assisted Solution

sujithcnair earned 400 total points
ID: 20046970
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

577 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