I need to display an image from my database. I post a form with some data with Json. After that, I get the result from the database. It’s almost the same as a reaction in facebook. You post your comment and you will get your comment formatted and your profileimage on the side.
I managed to get the data back but I don’t know how to get the image on the screen…
Should I try to create and url? I tryed that but I don’t know how to resolve the url in a javascript file.
Sorry, i’m new with Json and MVC 3.
Thanks
It is a bit stupid… I forgot that you could just use the controller and then the action. I did ImageController and not Image so the action wasn’t found. Thats why I thought that this wouldn’t worked. I now make an url property on the server and send that with Json. That property is rendered in the src attribute of the image tag.