Tag:mvc4

  • 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 4 using pagedlist.mvc paging implementation code

    Time:2021-6-14

    There are many ways to paginate in asp.net MVC. Pagedlist and pagedlist.mvc are provided in nuget. When you install and reference pagedlist.mvc, you will also install and reference pagedlist. Copy codeThe code is as follows:  @Html.PagedListPager((PagedList.IPagedList<SampleInfo>)ViewBag.Models, page => Url.Action(“Index”, new { page, keyword = Request[“keyword”], datemin = Request[“datemin”], datemax = Request[“datemax”] })) Search trigger event: […]

  • ASP. Net mvc4’s idea of updating form content through ID

    Time:2021-6-12

    User requirements: once a form is created, most of its fields can no longer be edited. Only some of the fields can be edited. Non editing is realized by setting the disabled attribute to the input box. At this time, an error will be reported to the content of the submit form in the database, […]