In the following ActionLink id like to set PartyId & IsFollowing with two jQuery vars
@Ajax.ImageActionLink("ToggleEnabled", "Following Status",
new { id = PartyId },
new AjaxOptions
{
UpdateTargetId = "ti" + PartyId,
InsertionMode = InsertionMode.Replace,
},
IsFollowing,
"../../Images/tick.png",
"../../Images/tick_grey.png",
PartyId)
How can I do this?
My Solution
As this cant be done the way I wanted, here is a jQuery version for completeness : This will toggle an image if clicked, update the DB via $.Ajax & change image to toggled version
HTML
jQuery & JavaScript
MVC Action