Pass multiple parameters and get data for the Web API

Source: Internet
Author: User

Learning the Web API in recent times is very interesting. The default routing scenario, when fetching data, does not have to specify an action action name.

There is another feeling, that is, since learning ASP, and jquery, let Insus.net has been slowly away from open ASP, think of that once handy web control ...

The first two practices of Web API for ASP. Http://www.cnblogs.com/insus/p/4334316.html has no parameters to fetch data. The HTML Web page uses jquery to pass parameters and get data for the Web API, but http://www.cnblogs.com/insus/p/4337409.html sends a single parameter to the Web API to get the data.

This insus.net wants to practice the method overloads in the Web API, and get the data by passing in multiple parameters. So these three articles are all type: "GET" .

In the API controller, create an action with multiple parameters, you can check the following code #31 start.


Create an HTML page, or use jquery to get involved in getting data.


Adding two text boxes is a multi-parameter method that allows users to go to multiple parameters to call the Web API.

Simulation Demo:

Pass multiple parameters and get data for the Web API

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.