I was doing this tutorial of asp.net, all fine, but I would like to add a “pictures” link in this table. And when its clicked in a new page the uploaded files will be shown of that ID.
How can I relate the pictures with the same ID of a line. I am new to C# MVC3, so some explanation would be appreciated.
Thanks.
Note: I edited it, so its using MySQL as database.
Once you have passed the model into your view from the controller you can create the link within the table like I’ve done below. This link will pass the id or whatever variable you have given or are using for the picture that you want to pass back to the Controller. From the controller use that id to pull the images and pass them into a new view.
This is a really good tutorial for beginning MVC
Accessing your model’s data from a controller