asp.net - Can i call/request a .net handler (ashx) using javascript? -


Is it possible to call handler by using javascript code? Like I have a handler posted at this place. Can I call this handler or just request to use javascript? Is it possible or not? Please suggest.

yes you can

use AJAX or jquery ajaxcall for this

The same Ajax function:

  Function ShowHint (alimene, url, arr) {if (window.XMLHttpRequest) {xmlhttp = new XMLHttpRequest (); } And {xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP"); } Xmlhttp.onreadystatechange = function () {if (xmlhttp.readyState == 4 & xmlhttp.status == 200} {document.getElementById (elementid) .winnerHTML = xmlhttp.responseText;}} Xmlhttp.open ("GET" , Url + str, true); xmlhttp.send ();}  

Comments