asp.net-mvc - 服务器端和客户端 MVC

标签 asp.net-mvc angularjs

关闭。这个问题需要更多 focused .它目前不接受答案。












想改进这个问题?更新问题,使其仅关注一个问题 editing this post .

5年前关闭。




Improve this question




我已经开始学习了ASP.Net MVC , 关于 MVC framework 我有几个问题[客户端或服务器端]。你可能会觉得这些问题很愚蠢,但我真的很困惑,想消除我的疑虑。

这里是....

  • ASP.Net MVC ,它是服务器端还是客户端框架?
  • 假设我的 Controller 方法从 SQL Server 获取数据, 我把它转换成 JSON并更新 MVC view , 在这种情况下

  • A. 它被称为客户端数据绑定(bind)还是服务器端绑定(bind)?

    B. 在使用 Controller 方法从数据库中检索数据时,我是获取整个 HTML 以及响应中的数据还是仅获取我请求的数据?
  • ASP.Net ,假设我在按钮单击事件中将数据插入到数据库中,如果我没记错,在这种情况下它将把整个页面提交给服务器,按钮单击事件如何在 ASP.Net MVC 中工作?
  • 我还读到我们可以使用 Angular.JSknockout.JSASP.Net MVC , 什么目的Angular.JSknockout.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/

    相关文章:

    c# - MVC4 WebApi 进程启动器

    c# - 通过 View 上的按钮运行方法(ASP.NET MVC)

    apache - 浏览器缓存行为问题,我总是必须清除缓存以进行 html 文件更新

    javascript - 如何使用 Angularjs 指令根据动态值更改文本颜色?

    javascript - History.popstate 不起作用,并且在浏览器中的前按钮和后按钮中调用

    c# - 在 Controller 中提交时 ViewModel 值为空

    asp.net - 添加 Web.config 作为链接

    c# - 我可以在 .NET Framework 4.0 上运行 MVC 5 应用程序吗?

    javascript - Angular ui 路由器 : keep same ui-view for child

    javascript - Protractor 和 Karma 可以一起使用吗?