MVC 3 Webgrid column to hold image
I am creating a WebGrid in ASP.NET MVC 3 for the first time and I need to create a column that holds a "star" image. A user shoul开发者_StackOverflowd be able to select on this image which would mean that they have selected it as a favorite. Then, I would have to get the transaction id of that row and save it using jquery.
Any help or examples with syntax would be appreciated. I am not using Razor.
You can start with something like this:
grid.Column(header: Favorite,
format: @<text><a href="@Url.Action("Favorite", "User", new { id = item.Id })" >
<img src="../../Content/Images/favorite.png"
alt="YourText" title="YourText"
width:"32px" height="32px"></a></text>)
精彩评论