ASP.NET MVC回发 [英] asp.net mvc postback

查看:56
本文介绍了ASP.NET MVC回发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ASP.NET MVC应用程序.但是,我无法理解在ASP.NET MVC页面中未发布/没有回发的事实.那怎么可能?除非发布数据,否则MVC框架如何处理发布的数据.因此,告诉ASP.NET MVC没有回发是什么意思.还有REST原理到底是什么?

I am using ASP.NET MVC application. However I am not able to understand the fact that in ASP.NET MVC pages are not posted/no postbacks. How is that possible? Unless posting the data how can the MVC framework manipulate the posted data. So what is the point in telling ASP.NET MVC does not have post backs. And also what the REST principle all about?

无法从我所看到的Web内容中了解.谁能解释?

Not able to understand from the web contents I have seen. Can anyone explain?

推荐答案

ASP.NET帖子与ASP.NET MVC帖子之间的区别在于,在MVC中,您的页面不会经历ASP.NET的传统页面生命周期.而是将您的帖子映射到单个方法进行处理.

The difference between ASP.NET posts and ASP.NET MVC posts is that in MVC, your page does not undergo the traditional page lifecycle of ASP.NET. Instead, your posts are mapped to a single method for processing.

MVC的部分吸引力在于,它与传统ASP.NET的某些状态跟踪机制脱节了.由于每个POST或GET都映射到一个单独的控制器和方法,因此跟踪诸如视图状态之类的东西变得不必要了.

Part of the appeal of MVC is that it divorces itself from some of the state-tracking mechanisms of traditional ASP.NET. Since each POST or GET is mapped to an individual controller and method, it becomes less necessary to track things like view state.

正确地认为,发布模型不同于传统的Web表单,因为它不发布太多的状态信息并处理整个页面的生命周期,但仍依赖于我们熟悉的HTTP方法.

By not posting back as much state information and processing a full page lifecycle, the post model is rightly considered characteristically different from traditional web forms, but still relies on the HTTP methods we are familiar with.

关于REST的问题,您可以阅读Wikipedia的高级概述: http://en.wikipedia.org/wiki/RepresentationalalState_Transfer

With respect to your question about REST, you can read a high-level overview on Wikipedia: http://en.wikipedia.org/wiki/Representational_State_Transfer

这篇关于ASP.NET MVC回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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