How to create stackoverflow's post voting like ajax function?
- by Daoming Yang
Can I use Ajax or Jquery to call a action and change the image, just like stackoverflow's post voting function?
In my view, I'm using the following code, but I don't want to refresh the browser. Can anyone provide some code about this?
<%if (!item.IsPrinted)
{ %>
<%=Html.ImageLink("~/Content/images/web/delete.png", "printed", "MarkAsPrinted", "Order", item.TaskID, null, null)%>
<%}
else
{%>
<img src="~/Content/images/web/star.png" alt="printed" />
<% } %>