Hey, if his post helped your initial question, you should mark it as answered. Gives him points for helping you out.
So I'm not entirely sure I understand your question; you can actually still use generic handlers in MVC if you would like to, nothing precludes it. That said, to help you understand where things go, the way I would approach your app would be as follows:
-- Model of the user listings you mentioned, with URLs to the images already stored (in other words, I would probably *not* construct them on the fly). A separate model, if you like which defines the idea of an image resource (so, probably an ID of some
kind, a friendly description, and a byte[]).
-- Controller that routes to the user listings resource, and an ImageController which defines the usual CRUD (create read, update, delete) actions.
-- Views as appropriate. The Details action in this case might return a FileContentResult of the image data, so you wouldn't necessarily need a separate view file for that.
HOpe that helps.
Paul
Help those who have helped you... remember to "Mark as Answered"
paul.vencill
Contributor
6716 Points
1358 Posts
Re: Enable Links and Display Pictures from data base in MVC app
Apr 19, 2009 02:20 AM|LINK
Hey, if his post helped your initial question, you should mark it as answered. Gives him points for helping you out.
So I'm not entirely sure I understand your question; you can actually still use generic handlers in MVC if you would like to, nothing precludes it. That said, to help you understand where things go, the way I would approach your app would be as follows:
-- Model of the user listings you mentioned, with URLs to the images already stored (in other words, I would probably *not* construct them on the fly). A separate model, if you like which defines the idea of an image resource (so, probably an ID of some kind, a friendly description, and a byte[]).
-- Controller that routes to the user listings resource, and an ImageController which defines the usual CRUD (create read, update, delete) actions.
-- Views as appropriate. The Details action in this case might return a FileContentResult of the image data, so you wouldn't necessarily need a separate view file for that.
HOpe that helps.
Paul