how to display image in a bounded grid (to access .mdb) on a web page ???

Hello

My problem is this:
I am using Dreamweaver 8 to build a pesonnal web site. I added a page that will display thumbnails and of course when you clic you get big picture. pretty standard so far...

But I do not want to read file. instead I want to just upload a access file and read from the database...

I have build a dome using a dataviewgrid in a C# project (.exe) with visual studio 2005 and I fugured I could do the same and re-use the same logic on a datagrid in a web page.

So I created a web site in visual studio 2005 and added a grid and a data source... but now I cannot get the bitmap field to be displayed in the grid cell! I see all the text but no images :(

Is there a simpler way? some control that binds to a ado or oledb available out there? Or is there a better way to do this? I figure uploading a .mdb file is much simpler that sending a bunch of .jpg files! But how to do this????

once the visual studio page is done I will simply add it to the dreamweaver site and it should work ;) but I need help being sucha newby at web stuff!!!

thanks
LVL 2
aquila98Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RouchieCommented:
The gridview contains a field called the ImageField.  DW probably won't know it exists because it does not support ASP.NET very well, and certainly not ASP.NET 2.0 whatsoever.

Within the gridview's <columns> tags, add this line:

  <asp:imagefield datafield="myDataBaseImageFieldName" headertext="Picture" />

Obviously substituting "myDataBaseImageFieldName" with the correct name from your database field.

Here's a site with a working C# example - http://authors.aspalliance.com/aspxtreme/sys/web/ui/webcontrols/demos/gridviewimagefield.aspx
0
aquila98Author Commented:
exactly what I want...
except how can I get this to work thare is lots of stuff missing, where is this class fetchData_oledb.cs documented? I guess this is the data fetcher class from the access file... do you know where I can get a complete VS 2005 solution to better understand how the pieces work together?

but it is a great start, I'll try to integrate into my existing VS 2005 web site

thanks for the link
0
aquila98Author Commented:
the datafield is not part of the asp:imagefield... i used DataImageUrlField instead... but does not seems to work :(
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

RouchieCommented:
fetchData_oledb.cs will be the class that particular website is using to hide the database logic from readers.  Don't worry that - what's important is getting the ImageField created in the GridView, and pulling the data through into it.

If you've already got the database connection set up, just add the new gridview column and see what happens - ASP.NET should do the rest for you!
0
RouchieCommented:
>> i used DataImageUrlField instead... but does not seems to work :(

Okay I see your confusion. Before I go on I should just make sure that the images themselves are not stored in the database, just the file names, correct?

If so, now you've specified the image's file name, you need to specify the path

<asp:imagefield dataimageurlfield="dataBaseFieldName"  dataimageurlformatstring="~\Images\{0}.jpg"  />
0
aquila98Author Commented:
in fact, the image data is stored in the database file.
I have a VS2005 c# application that build the access database with the actual .jpg and a reduce thumbnail for each row of the database. Then I upload the .mdb filr to the web site and the page should display the thumbnail in a grid. When the user clic a thumbnail it display a detailview with the actual picture and metadata taken from the database. not url and no .jpg files are uploaded to the website...

0
RouchieCommented:
Ahh okay, well then this approach won't work without modification.  I've not used your approach before, but I believe you need to create a sub that converts the raw data into an image.

You might have to Google the display of images from a database, but this page has a sample:

http://www.syncfusion.com/FAQ/aspnet/WEB_c27c.aspx#q567q
http://www.codeproject.com/cs/database/images2db.asp
0
aquila98Author Commented:
first solution is close... but the grid would have to open a connection for each row and worse it savec the image to a file...

if there was a way to generate the urldynamically to fool the grid into thinking that the data is from a file but instead package it from a stream ...
something like http://getpicturedatafromdatabase.aspx?pictureidfromgrid then I could use the <asp:imagefield dataimageurlfield=...

have you seen such code anywhere?

I'll google, thanks for help!
0
RouchieCommented:
No I haven't I'm afraid, and DW certainly won't help you.  You really need to be using VS2005 (I use the free Web Developer version).

You could try posting a link in the ASP.NET topic area.  I'm sure one of those Experts will know how to solve it.
0
RouchieCommented:
Ah sorry I didn't realise you had cross-posted.  I'm sure someone will help soon enough... :-)
0
aquila98Author Commented:
I have found a working solution...
I build a webcontrol using a sample provided by msdn (wickedcode056) and I converted the field in the grid to a template. Then I edited the template and replaced the label control with a webcontrol to display the image and behold it worked!

thanks anyway for your hints.
0
kodiakbearCommented:
Closed, 125 points refunded.
kb
Experts Exchange Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.