通过HttpPost启动MVC应用程序 [英] Launching MVC Application through HttpPost
问题描述
以下是我的业务情景,我正在努力找出解决问题的最佳解决方案
业务问题
我有一个上游系统调用我的MVC应用程序。参数通过HttpPost而不是参数化的URL传递。
可能的解决方案?
1)创建一个基于HttpPost主体的自定义模型绑定器,并创建一个强类型模型。假设任何HttpPost属性都将读取传递的URL而不是表单集合
我不确定上述解决方案是否有效或者是否存在有效的替代方案可以处理任何通用的HttpPost。
你可以使用FormCollection动态处理帖子
< a href =http://www.codeproject.com/Articles/639709/Getting-Data-From-View-to-Controller-in-MVC>从视图中获取数据到MVC中的控制器 [ ^ ]
Hi,
Below is my business scenario and I am trying to identify the best possible solution to address it
Business Problem
I have an upstream system which invokes my MVC application. The parameters are passed through a HttpPost rather than parameterized URL.
Possible Solution ?
1) Create a custom model binder based on the body of the HttpPost and create a strongly typed model. Assumption is that any HttpPost attribute will read the URL passed rather than the form collection
I am not sure if the above solution would work or if there is an efficient alternative which can handle any generic HttpPost.
You can use the FormCollection to process the post dynamically
Getting Data From View to Controller in MVC[^]
这篇关于通过HttpPost启动MVC应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!