I'm changing the link of an image on the client side and it invokes the controller asynchronously.
I don't understand this behavior, could someone explain me what is happening?
Why url adding actually invokes the controller by default, moreover it happens asynchronously.
<script>
$("#refreshLnk").click(function () {
$("#cap").attr('src', '@Url.Action("CaptchaImage")?' + new Date().getTime());
});
</script>
<img id="cap" alt="Captcha" src="@Url.Action("CaptchaImage")" style="" />
<a id="refreshLnk" href="#">refresh</a>
public ActionResult CaptchaImage()
{
}