gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-05 01:12:40 26 4
gpt4 key购买 nike

关闭。这个问题需要更多 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/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com