作者wise2525 (Allegro)
看板C_Sharp
標題[問題] mvc關於identity擴充欄位抓取
時間Mon Sep 10 14:32:47 2018
mvc如果要使用預設會員登入系統的話
抓取系統預設欄位的值時
只需要一行
User.Identity.GetUserName()
User.Identity.GetUserId()
等等就能輕鬆抓出來
但假如說今天是要抓擴充欄位的值
比如自己加的CId ,Gender等等欄位
請問要如何實現如上一樣的方式呢
請問有大大能夠教學一下嗎><
-----
Sent from JPTT on my HTC_U-3u.
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 123.195.90.98
※ 文章網址: https://www.ptt.cc/bbs/C_Sharp/M.1536561171.A.E6F.html
推 wezmag: Google “user identity get custom property” 第一個Sta 09/10 19:35
→ wezmag: ckoverflow點進去 09/10 19:35