<i id='08XPm'><tr id='08XPm'><dt id='08XPm'><q id='08XPm'><span id='08XPm'><b id='08XPm'><form id='08XPm'><ins id='08XPm'></ins><ul id='08XPm'></ul><sub id='08XPm'></sub></form><legend id='08XPm'></legend><bdo id='08XPm'><pre id='08XPm'><center id='08XPm'></center></pre></bdo></b><th id='08XPm'></th></span></q></dt></tr></i><div id='08XPm'><tfoot id='08XPm'></tfoot><dl id='08XPm'><fieldset id='08XPm'></fieldset></dl></div>
  • <legend id='08XPm'><style id='08XPm'><dir id='08XPm'><q id='08XPm'></q></dir></style></legend>

    <small id='08XPm'></small><noframes id='08XPm'>

      <tfoot id='08XPm'></tfoot>

          <bdo id='08XPm'></bdo><ul id='08XPm'></ul>
      1. 更新 .NET core 中身份登录页面的默认前端设计

        时间:2023-07-12
        <tfoot id='HHKnG'></tfoot>
        1. <legend id='HHKnG'><style id='HHKnG'><dir id='HHKnG'><q id='HHKnG'></q></dir></style></legend>

          <small id='HHKnG'></small><noframes id='HHKnG'>

            <bdo id='HHKnG'></bdo><ul id='HHKnG'></ul>
                <tbody id='HHKnG'></tbody>

                <i id='HHKnG'><tr id='HHKnG'><dt id='HHKnG'><q id='HHKnG'><span id='HHKnG'><b id='HHKnG'><form id='HHKnG'><ins id='HHKnG'></ins><ul id='HHKnG'></ul><sub id='HHKnG'></sub></form><legend id='HHKnG'></legend><bdo id='HHKnG'><pre id='HHKnG'><center id='HHKnG'></center></pre></bdo></b><th id='HHKnG'></th></span></q></dt></tr></i><div id='HHKnG'><tfoot id='HHKnG'></tfoot><dl id='HHKnG'><fieldset id='HHKnG'></fieldset></dl></div>
                • 本文介绍了更新 .NET core 中身份登录页面的默认前端设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在开发一个带有身份登录的 .NET 核心应用程序,它在/Identity/Account/Login 页面中提供了一个引导表单.

                  I am developing a .NET core application with Identity login which provides a Bootstrap form In the /Identity/Account/Login page.

                  我已在 wwwroot/lib 文件夹中导入 Materialize CSS 文件,并想更改登录页面的设计也使用了materialize css.

                  I have imported Materialize CSS files in the wwwroot/lib folder and want to change the Login page's design with materialize css as well.

                  问题是项目结构中不存在/Identity/Account/Login 页面.那么我应该如何解决这个问题呢?

                  The problem is /Identity/Account/Login page doesn't exist in project structure. Then how should I approach to solve this problem?

                  推荐答案

                  一种方法是 搭建登录页面,将其添加到您的项目结构中.然后,您将能够进行任何您想要的更改.您必须执行以下操作(来自我提供的链接):

                  One way would be to scaffold the login page, which would add it to your project structure. Then you would be able to make any changes you want. You would have to do the following (from the link I provided):

                  • Solution Explorer 中,右键单击项目 > 添加 > 新建脚手架项目.
                  • 添加脚手架对话框的左侧窗格中,选择Identity > ADD.
                  • ADD Identity 对话框中,选择所需的选项(在您的情况下为 Login).
                    • 选择您现有的布局页面,否则您的布局文件将被错误的标记覆盖.当一个现有的 _Layout.cshtml文件被选中,它没有被覆盖.
                    • From Solution Explorer, right-click on the project > Add > New Scaffolded Item.
                    • From the left pane of the Add Scaffold dialog, select Identity > ADD.
                    • In the ADD Identity dialog, select the options you want (in your case Login).
                      • Select your existing layout page, or your layout file will be overwritten with incorrect markup. When an existing _Layout.cshtml file is selected, it is not overwritten.

                    例如 ~/Pages/Shared/_Layout.cshtml 用于 Razor 页面~/Views/Shared/_Layout.cshtml 用于 MVC 项目

                    For example ~/Pages/Shared/_Layout.cshtml for Razor Pages ~/Views/Shared/_Layout.cshtml for MVC projects

                    • 要使用现有数据上下文,请选择至少一个要覆盖的文件.您必须至少选择一个文件来添加数据上下文.
                      • 选择您的数据上下文类.
                      • 选择添加.
                      • 选择 + 按钮以创建新的数据上下文类.
                      • 选择添加.

                      注意:如果您要创建新的用户上下文,则不必选择要覆盖的文件.

                      Note: If you're creating a new user context, you don't have to select a file to override.

                      另一种方法是查看 登录页面源代码 并查看 HTML 元素的 id 和类.然后,您可以通过编写比默认 CSS 更具体的 CSS 来覆盖默认 CSS.

                      Another way would be to look at the Login page source code and see HTML elements' ids and classes. Then you could override the default CSS by writing your own CSS that would be more specific than the default one.

                      这篇关于更新 .NET core 中身份登录页面的默认前端设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:向接受 ICollection&lt;IFormFile&gt; 的 ASP.NET 控制器提交多个文件 下一篇:如何对数据库中的用户使用 Windows 身份验证

                  相关文章

                  1. <legend id='VMBxM'><style id='VMBxM'><dir id='VMBxM'><q id='VMBxM'></q></dir></style></legend>
                    <tfoot id='VMBxM'></tfoot>

                    1. <small id='VMBxM'></small><noframes id='VMBxM'>

                      <i id='VMBxM'><tr id='VMBxM'><dt id='VMBxM'><q id='VMBxM'><span id='VMBxM'><b id='VMBxM'><form id='VMBxM'><ins id='VMBxM'></ins><ul id='VMBxM'></ul><sub id='VMBxM'></sub></form><legend id='VMBxM'></legend><bdo id='VMBxM'><pre id='VMBxM'><center id='VMBxM'></center></pre></bdo></b><th id='VMBxM'></th></span></q></dt></tr></i><div id='VMBxM'><tfoot id='VMBxM'></tfoot><dl id='VMBxM'><fieldset id='VMBxM'></fieldset></dl></div>
                      • <bdo id='VMBxM'></bdo><ul id='VMBxM'></ul>