自定义用户登录Asp.net mVC [英] Custom User Login Asp.net mVC

查看:122
本文介绍了自定义用户登录Asp.net mVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用本教程创建了**自定义用户登录**。



^ ]



当用户登录用户时被重定向到家庭控制器,我该如何收回该用户的用户ID。

I created a **custom user login** using this tutorial.

Creating a custom user login form with .NET C# MVC 4 Razor[^]

when the user logs in the user is redirected to the home controller, how can I retieve user Id of that user.

推荐答案

内部用户模型添加Id属性以使用数据库的Id进行映射。
Inside User model add the Id property to map with Id of your database.


这篇关于自定义用户登录Asp.net mVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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