fguihen Posted June 22, 2004 Posted June 22, 2004 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... Quote
Moderators Robby Posted June 23, 2004 Moderators Posted June 23, 2004 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 Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.