关闭。这个问题需要更多 focused .它目前不接受答案。
想改进这个问题?更新问题,使其仅关注一个问题 editing this post .
5年前关闭。
Improve this question
我已经开始学习了ASP.Net MVC
, 关于 MVC framework
我有几个问题[客户端或服务器端]。你可能会觉得这些问题很愚蠢,但我真的很困惑,想消除我的疑虑。
这里是....
ASP.Net MVC
,它是服务器端还是客户端框架? SQL Server
获取数据, 我把它转换成 JSON
并更新 MVC view
, 在这种情况下 A. 它被称为客户端数据绑定(bind)还是服务器端绑定(bind)?
B. 在使用 Controller 方法从数据库中检索数据时,我是获取整个 HTML 以及响应中的数据还是仅获取我请求的数据?
ASP.Net
,假设我在按钮单击事件中将数据插入到数据库中,如果我没记错,在这种情况下它将把整个页面提交给服务器,按钮单击事件如何在 ASP.Net MVC
中工作? Angular.JS
或 knockout.JS
与 ASP.Net MVC
, 什么目的Angular.JS
或 knockout.JS
如果我们将它与 ASP.Net MVC
一起使用会解决? 问候
最佳答案
ASP.Net MVC, is it server side or client side framework?
> MVC - is Model View Controller - its All-in-One
Let's say my controller methods getting data from the SQL Server, I convert it into JSON and updating the MVC view, in this case
Is it called as Client side data binding or Server side binding?
> Server side is ALL what you do with C# (In class library/controllers etc)
While retrieving the data from database using controller method, do i get entire HTML along with data in the response or just the data that I have requested for?
>If you will use knockout / angular - then you need just get data from server, and data-bind will happen automatically
In ASP.Net, lets say I am inserting data in database on button click event and If I am not wrong, in this case it will submit the entire page to the server, how button click event works in ASP.Net MVC?
>Or with submit form (to action url) - or with client framework (knockout/angular) - you just send json
I have also read that we can use Angular.JS or knockout.JS with ASP.Net MVC, what purpose Angular.JS or knockout.JS would solve if we use it with ASP.Net MVC?
>Angular more rich framework. In knockout we have only data-bind with html. It depends on what you need for your project.
关于asp.net-mvc - 服务器端和客户端 MVC,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31808762/