基于原来做的cookie认证的代码:MvcCookieAuthSample

任务43:Identity MVC:UI

任务43:Identity MVC:UI

增加登陆和退出的方法:

增加Login和SignIn这两个Action方法。

任务43:Identity MVC:UI

在Views下面创建Account文件夹,然后在里面创建两个视图页面。

我是赋值下面的Privacy.cshtml页面到Account文件夹。然后改了名字为Register.cshtml和Login.cshtml这两个视图页面。

任务43:Identity MVC:UI

 

 

 

任务43:Identity MVC:UI

创建文件夹:ViewModels

再创建RegisterViewModel.cs

任务43:Identity MVC:UI

 

任务43:Identity MVC:UI

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace MvcCookieAuthSample.ViewModels
{
    public class RegisterViewModel
    {
        public string Email { get; set; }
        public string Password { get; set; }

        public string ConfirmPassword { get; set; }
    }
}
RegisterViewModel

相关文章:

  • 2021-05-07
  • 2022-01-06
  • 2021-10-19
  • 2021-07-05
  • 2022-12-23
  • 2021-06-05
  • 2021-07-02
  • 2021-12-16
猜你喜欢
  • 2021-07-25
  • 2021-05-25
  • 2022-01-18
  • 2021-12-27
  • 2021-10-07
  • 2021-11-24
  • 2021-08-10
相关资源
相似解决方案