Why changing image link invokes controller asynchronously in asp.net mvc
I'm changing the link of image on client side and it's invokes controller
asynchronously, I don't understand this behavior, could someone explain me
what happens? 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()
{
}
No comments:
Post a Comment