Post model to Web Api to create or save data, modelapi

Source: Internet
Author: User

Post model to Web Api to create or save data, modelapi

In the previous article "Post model to Web Api" http://www.cnblogs.com/insus/p/4343538.html, use postto obtain data from Web Api. Since the Post method cannot be overloaded, the previous article can only be regarded as another example.

In this article, we need to learn another function, that is, to create an object or save data from the Pst model to the Web Api. Therefore, it is comment out.


After passing data to Web APIs, You can process and save the data. You can store the data in memory, files, or databases. In this demonstration, Insus. NET wants to convert the uploaded data to JSON and save it as a file.

 


Create an html webpage:


Next, click the button event. In some cases, you need to specify the type as POST, for example, in line #20. # The 24 rows must be serialized using JSON. stringify.


Real-time Demonstration:

 

Related Article

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.