Hello,
I have been pulling my hair out about this since Friday and I am going nuts. I want to have the ability for a user to submit a form with an image, and have that image stored into a database. Then I want that image displayed on my index view.
I have tried all of the other stackoverflow help topics on here already and none of them are working for me.
I am following the directions in "Pro ASP.NET MVC Framework" by Steven Sanderson (pages 195-198), and it is just not working. It works great in his sample application that accompanies the book.
I created a test MVC application which has the index and create views. It is saving something to the database because I can see the "Binary Data" field populated with those two words. But it won't display. I don't know if it won't display because I am saving the image to the database wrong, or something else.
There is just way too much code to post here, but I compiled a simple application into a .zip file which shows exactly what I am trying to accomplish. I hope is allowed. Could one of you MVC experts please download it and tell me what I am doing wrong and why it doesn't work? I am at my wits end over this and I am so confused.
Please let me know if you need any more info.
Thanks so much, Shawn
My file is located at: http://www.fraxis.com/test.zip
It was built using Visual Studio 2008 with .NET 3.5(SP1) and ASP.NET MVC 1.0.
Everything is in the HomeController and the Home view. Index and Create. The database is in app_data.