使用ASP.NET可以使用WebAPI吗?
解决方法
Although ASP.NET Web API is packaged with ASP.NET MVC,it is easy to
add Web API to a Traditional ASP.NET Web Forms application. This
tutorial walks you through the steps.To use Web API in a Web Forms application,there are two main steps:
Add a Web API controller that derives from the ApiController class.
Add a route table to the Application_Start method. Create a Web Forms
ProjectStart Visual Studio 2010 and select New Project from the Start page.
Or,from the File menu,select New and then Project.In the Templates pane,select Installed Templates and expand the Visual C# node. Under Visual C#,select Web. In the list of project templates,select ASP.NET Web Application. Enter a name for the project and click OK.
原文地址:https://www.jb51.cc/aspnet/250222.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。