Here Mudassar Khan has explained with an example, how to perform a jQuery AJAX GET call with Success, Error and Failure event handlers.For illustration purposes, this article makes use of ASP.Net MVC application.
Bạn đang xem: How to use $
Next step is to add a View for the Controller and while adding you will need to select the PersonModel class created earlier.
The Button has been assigned a jQuery click event handler and when the Button is clicked a jQuery AJAX called is made to the Controller’s action method.
The TYPE is set to GET and the URL for the jQuery AJAX call is set to the Controller’s action method i.e. /Home/AjaxMethod.
Thank you for the feedback. The comment is now awaiting moderation. You will be notified via email when the author replies to your comment.
You can add your comment about this article using the form below. Make sure you provide a valid email address else you won"t be notified when the author replies to your commentPlease note that all comments are moderated and will be deleted if they areNot relavant to the articleSpamAdvertising campaigns or links to other sitesAbusive content.Please do not post code, scripts or snippets.
Disclaimer: The code samples and API available at www.darkedeneurope.com are available absolutely free. You are free to use it for commercial as well as non-commercial use at your own risk, but you cannot use it for posting on blogs or other tutorial websites similar to www.darkedeneurope.com without giving reference link to the original article. All the code samples and API provided by the authors are solely their creation and neither the author nor the site are responsible if it does not work as intended.