开发者

Authenticate Information

开发者 https://www.devze.com 2023-02-28 10:26 出处:网络
Okay so i have a brows开发者_如何学JAVAer in my form. The browser automatically opens up a log in page on form load. After the user has logged in, the website will say hello and (their user name) For

Okay so i have a brows开发者_如何学JAVAer in my form. The browser automatically opens up a log in page on form load. After the user has logged in, the website will say hello and (their user name) For example, after logging in the site will say Hello, Hex. Now in my program i need to extract the name and put it into a label on my form. Is there any way i can do this?


I think you are looking for the User.Identity.Name property. (HttpContext.Current)


Try to use Label1.Text = Me.User.Identity.Name or as pointed out by Jeff

Label1.Text = HttpContext.Current.User.Identity.Name

0

精彩评论

暂无评论...
验证码 换一张
取 消