GetUserId() 方法返回指定用户的 ID。
参数 | 类型 | 描述 |
---|---|---|
userName | String | 用户名 |
类型 | 描述 |
---|---|
Integer | 用户 ID |
在下面的情况下,任何对 WebSecurity 对象的访问将抛出一个 InvalidOperationException:
用户 ID 是存储在用户数据库中的用户信息的主键。
它是用于在用户资料表和会员表中识别用户。
名称 | 值 |
---|---|
Namespace | WebMatrix.WebData |
Assembly | WebMatrix.WebData.dll |
ASP.NET 控件标准属性 Web 服务器控件属性 下面的表格描述了继承自 Control 类的属性: 属性 描述 .NET AppRelativeTemplateSour...
WebSecurity - RequireRoles()WebSecurity 对象定义 如果当前用户不是所有指定角色的成员, RequireRoles() 方法设置 HTTP 状态...
ASP.NET CheckBoxList CellPadding 属性 CheckBoxList 控件定义和用法 CellPadding 属性用于获取或设置表格单元格的边框与内容之...
ASP.NET CheckBoxList TextAlign 属性 CheckBoxList 控件定义和用法 TextAlign 属性用于获取或设置 CheckBoxList 项目的文本的文...
WebSecurity - IsConfirmed()WebSecurity 对象定义 IsConfirmed() 方法返回一个指示指定用户是否已被确认的值。C# 和 VB 语法Web...