Tag:MVC

  • Understand the design structure of Ruby on rails framework in the way of MVC

    Time:2021-12-3

    In rails, the whole process of sending a request (/ users) is as follows:1) , browser send request (/ users)2) Rails routes will route requests to users_ Index method of controller3)、users_ The controller callback uses the user model to get all users4) User model will read all users from the database,5) User model encapsulates all […]

  • Detailed explanation of asp.net MVC parsing template to generate static pages (razorengine)

    Time:2021-12-3

    sketch Razor is a new technology added to asp.net MVC 3 as a new alternative to ASPX engine. In the early MVC versions, the ASPX template engine is used by default. Razor is really good in syntax and is very convenient to use. The concise syntax is combined with the. Net framework and is widely […]

  • Asp.net MVC uses razor engine to generate static pages

    Time:2021-12-2

    Recently, I am studying the generation of static pages by asp.net MVC, so today is also a learning note! Implementation principle and steps: 1. Find the corresponding view through viewengines.engines.findview. If it is a partial view, use viewengines.engines.findpartialview; 2. Set the model in the context object; 3. Call the render () method of the view […]

  • Asp.net MVC makes 404 jump instances (not 302 and 200)

    Time:2021-11-26

    The main causes of 404 are as follows: 1. Browsers and crawlers: some browsers will request the favicon.ico of the website. If there is no such file in the root directory of your website, the browser will have a 404 log. Similarly, the search engine will request robots.txt. But this has little impact. 2. The […]

  • Build a simple MVC e-commerce website booksstore step by step (1)

    Time:2021-11-24

    Build a simple MVC e-commerce website – booksstore step by step (I) GitHub address of this series:https://github.com/liqingwen2015/Wen.BooksStore 《Build a simple MVC e-commerce website – booksstore step by step (I)》 《Build a simple MVC e-commerce website – booksstore step by step (II)》 《Build a simple MVC e-commerce website – booksstore step by step (III)》 《Build a […]

  • Build a simple MVC e-commerce website booksstore step by step (2)

    Time:2021-11-23

    Build a simple MVC e-commerce website – booksstore step by step (II) GitHub address of this series:https://github.com/liqingwen2015/Wen.BooksStore 《Build a simple MVC e-commerce website – booksstore step by step (I)》 《Build a simple MVC e-commerce website – booksstore step by step (II)》 《Build a simple MVC e-commerce website – booksstore step by step (III)》 《Build a […]

  • Build a simple MVC e-commerce website booksstore step by step (3)

    Time:2021-11-22

    Build a simple MVC e-commerce website – booksstore step by step (III) GitHub address of this series:https://github.com/liqingwen2015/Wen.BooksStore 《Build a simple MVC e-commerce website – booksstore step by step (I)》 《Build a simple MVC e-commerce website – booksstore step by step (II)》 《Build a simple MVC e-commerce website – booksstore step by step (III)》 《Build a […]

  • Build a simple MVC e-commerce website booksstore step by step (4)

    Time:2021-11-21

    Build a simple MVC e-commerce website – booksstore step by step (IV) GitHub address of this series:https://github.com/liqingwen2015/Wen.BooksStore 《Build a simple MVC e-commerce website – booksstore step by step (I)》 《Build a simple MVC e-commerce website – booksstore step by step (II)》 《Build a simple MVC e-commerce website – booksstore step by step (III)》 《Build a […]

  • Method of JSON data interaction in asp.net MVC 4

    Time:2021-11-7

    The foreground Ajax request often needs to obtain JSON format data from the background, generally in the following ways: Splice string return Content(“{\”id\”:\”1\”,\”name\”:\”A\”}”); In order to strictly conform to the JSON data format, double quotation marks are escaped. Use the JavaScript serialize. Serialize() method to serialize the object into a JSON formatted string MSDN For […]

  • Solutions to errors reported by MVC controller with EF added to vs2017

    Time:2021-11-4

    The solution to the error of MVC controller with EF added in vs2017 is for your reference. The specific contents are as follows 1. Error Description:no database provider has been configured fot this DbContext. This kind of error is caused by context registration. The solution is to override onconfiguring method in dbcontext to inject database […]

  • Several forms of asp.net MVC transferring parameters from view to controller

    Time:2021-10-18

    1. Pass array $(function () { var value = [“C#”, “JAVA”, “PHP”]; $(“input[type=’button’]”).click(function () { $.ajax( { url: “/Home/List”, type: “Get”, data: { valuelist: value }, Traditional: true, // this property must be set, otherwise the value cannot be obtained from the controller success: function (data) { alert(“Success”); } }); }); }); public ActionResult List(List<string> […]

  • Explain the common extension points of asp.net MVC: filter and model binding

    Time:2021-10-11

    1、 Filter Each request in asp.net MVC will be assigned to a specific action (hereinafter referred to as “method”) under the corresponding controller (hereinafter referred to as “controller”) for processing. Normally, it is OK to write code directly in the method. However, if you want to process some logic before or after the method is […]