views:

33

answers:

2

This is something I just couldn't figure out how to do in ASP.NET:

I have a database of photographs, with upload/management and all that.

What I want to do is to dynamically change/create a css file that changes the background of a div to one of the selected images on the database. (bing.com style).

Is this possible using images stored directly on the database? (sql2008) Or maybe possible only using uploading images to a directory and saving it's path/name on database?

A: 

This SO search has lots of articles along your line. Perhaps a few of them will give you some ideas.

http://stackoverflow.com/search?q=ASP.NET+image+database

kbrimington
+1  A: 

you would use an HttpHandler to read the image from the db and serve it up. Then you could also create an HttpHandler to create a small css file for the background css.

See http://msdn.microsoft.com/en-us/library/f3ff8w4a(VS.71).aspx

Moose