Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
sorry for asking this as im sure you heard it all before, but im real used to creating pages with old asp, where i used "islands of code" which wrote html and any info contained in a DB out as a string, which was recognised by the browser and desplayed as a web page. now with asp.net im stumped. ive tried to follow tutorials but i dont know how to addata contained in a DB to a web page.eg..i have paths to pictures in a database. i want to display theese pics on my web page, but i dont know how to . can anyone just show me the code to do this, or point me to a good tutorial ( not a microsoft tutorial). thank you all...
  • Moderators
Posted

Hopefuly you're able to get a DataReader going:

 

Loop your dr with something like this...

 

'option 1 using an html image tag

While dr.Read

<img src=" & Convert.toString(dr.("myfieldWithImagePath")) & " />"

end while

 

'Option 2 using an ASP Image control

While dr.Read

dim img as new webcontrols.Image

me.controls.add(img)

img.ImageUrl = Convert.toString(dr.("myfieldWithImagePath"))

end while

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...