asp.net Web窗体和Web API [英] asp.net Web Forms and Web API

查看:196
本文介绍了asp.net Web窗体和Web API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用的.NET Web API来构建Web服务来处理HTTP表单提交(CRUD)

I need to build a web service to handle HTTP Form posts (CRUD) using .Net Web API

虽然我知道,API可以在的WebForms我听说类型的事情之前运行(参见动态数据),然后在现实中遇到功能的变通办法,限制等方面的需求。

Although I am aware that the API can be run under WebForms I have heard that type of thing before (see 'Dynamic Data') and then in the reality encountered the need for functional work-arounds, limitations etc.

有没有人使用的Web API根据Web窗体CRUD?任何问题?

Has anyone used Web API for CRUD under Web Forms? Any issues?

感谢您的任何见解!

推荐答案

这工作得很好。该职位在<一个href=\"http://blogs.msdn.com/b/henrikn/archive/2012/02/23/using-asp-net-web-api-with-asp-net-web-forms.aspx\" rel=\"nofollow\">http://blogs.msdn.com/b/henrikn/archive/2012/02/23/using-asp-net-web-api-with-asp-net-web-forms.aspx对如何使这项工作一步一步的指导。当你在你的意见一说,的ASP.NET Web API可以MVC4外使用,要做到这一点最简单的方法是使用的NuGet只下载Web API包。该职位在<一个href=\"http://blogs.msdn.com/b/carlosfigueira/archive/2012/07/12/creating-asp-net-web-apis-on-azure-web-sites.aspx\" rel=\"nofollow\">http://blogs.msdn.com/b/carlosfigueira/archive/2012/07/12/creating-asp-net-web-apis-on-azure-web-sites.aspx这是否(它显示一个空的Web应用程序所使用的Web API,但是,同样也适用于Web表单以及)。

That works just fine. The post at http://blogs.msdn.com/b/henrikn/archive/2012/02/23/using-asp-net-web-api-with-asp-net-web-forms.aspx has a step-by-step guide on how to make that work. As you said in one of your comments, ASP.NET Web API can be used outside of MVC4, and the easiest way to do that is to use NuGet to download the Web API packages only. The post at http://blogs.msdn.com/b/carlosfigueira/archive/2012/07/12/creating-asp-net-web-apis-on-azure-web-sites.aspx does that (it shows Web APIs being used in an empty web application, but the same applies to web forms as well).

这篇关于asp.net Web窗体和Web API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆