[MVC] Ajax helper Methods

Source: Internet
Author: User

Before you can start using the Ajax helper method, you must load jquery and the Jquery.unobtrusive-ajax.js file in the page to perform properly.

In order for the website to load the appropriate JS library, the layout page must first be loaded into the appropriate JS file, in the MVC4 template, the jquery file is added by default, the code is as follows:

1         @Scripts. Render ("~/bundles/jquery")2         @RenderSection ("  Scripts"false)

where @scripts.render ("~/bundles/jquery") is loaded into the "jquery-x.x.x.js" file. Because AJAX functionality is not required for every page, it is not loaded in the presets. If you need to use the Ajax helper method of ASP. NET MVC in the page, you can add the following @section syntax to each page that needs to use the Ajax helper method.

[MVC] Ajax helper Methods

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.