您的 宣传网址:  
首页   编程学习  

WebSecurity - GetUserId()


WebSecurity 对象 WebSecurity 对象

定义

GetUserId() 方法返回指定用户的 ID。


C# 和 VB 语法

WebSecurity.GetUserId(userName)


参数

参数 类型 描述
userName String 用户名


返回值

类型 描述
Integer

用户 ID



错误和异常

在下面的情况下,任何对 WebSecurity 对象的访问将抛出一个 InvalidOperationException:


备注

用户 ID 是存储在用户数据库中的用户信息的主键。

它是用于在用户资料表和会员表中识别用户。


技术数据

名称 值
Namespace WebMatrix.WebData
Assembly WebMatrix.WebData.dll


WebSecurity 对象 WebSecurity 对象
×
空若网-温馨提示

您尚未登陆

请登陆后在来吧



空若网