This is something I just couldn't figure out how to d开发者_运维知识库o 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?
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
This SO search has lots of articles along your line. Perhaps a few of them will give you some ideas.
https://stackoverflow.com/search?q=ASP.NET+image+database
精彩评论