在.NET Core中更新身份登录页面的默认前端设计 [英] Updating default front-end design of Identity Login Page in .NET core

查看:468
本文介绍了在.NET Core中更新身份登录页面的默认前端设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发具有身份登录名的.NET核心应用程序,该应用程序在/Identity/Account/Login页面中提供了 Bootstrap表单.

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

我已经在wwwroot/lib文件夹中导入了 对CSS进行材料文件,并希望更改登录页面的设计也实现了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 中,右键单击项目> 添加> 新脚手架项目.
  • 添加支架对话框的左窗格中,选择身份> ADD .
  • ADD身份对话框中,选择所需的选项(在您的情况下为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 ~/Views/Shared/_Layout.cshtml用于MVC项目

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

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆