ASP.NET MVC 中 Controller.ReadFromRequest 的替代品是什么?
我正在尝试将项目从 ASP.NET MVC Preview 3 更新到 Preview 5,似乎 Controller.ReadFromRequest(string key) 已从 Controller 类中删除。 有谁知道根据表单中的标识符检索信息的任何替代方法?
I am attempting to update a project from ASP.NET MVC Preview 3 to Preview 5 and it seems that Controller.ReadFromRequest(string key) has been removed from the Controller class. Does anyone know of any alternatives to retrieving information based on an identifier from a form?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看起来他们添加了controller.UpdateModel来解决这个问题,签名是:
我没有亲自升级我的应用程序,所以我不确定实际的用法。 我自己也有兴趣了解这一点,因为我也在使用
controller.ReadFromRequest
。Looks like they've added controller.UpdateModel to address this issue, signature is:
I haven't upgraded my app personally, so I'm not sure of the actual usage. I'll be interested to find out about this myself, as I'm using
controller.ReadFromRequest
as well.不知道它去了哪里。 不过,您可以推出自己的扩展:
public static class MyBindingExtensions
{
Not sure where it went. You could roll your own extension though:
public static class MyBindingExtensions
{
你能在tinyurl.com之类的地方重做那个链接吗?
我也需要此信息,但可以使大型链接正常工作。
could you redo that link in something like tinyurl.com?
I need this info too but can get that mega-link to work.