CurrentUserName

收藏:0   阅读:75

WebSecurity 属性 -?CurrentUserName


定义

CurrentUserName 属性是当前用户在 WebSecurity 数据库中用户资料表中的名称。


C# 和 VB 语法

WebSecurity.CurrentUserName


实例

实例 C#

@{
string value;
value=WebSecurity.CurrentUserId;
}

<p>Welcome @value</p>

实例 VB

@Code
Dim value as String
value=WebSecurity.CurrentUserName
End Code

<p>Welcome @value</p>


备注

CurrentUserName 属性是只读的。它不能通过代码更改。


错误和异常

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


技术数据

名称
Namespace WebMatrix.WebData
Assembly WebMatrix.WebData.dll
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!