how to get current UserId, UserName?

Topics: ASP.NET 2.0, Controls
Jun 12, 2011 at 4:28 PM
Edited Jun 12, 2011 at 4:28 PM

i writing an Extension but i don't know how to get current UserId, Username, can you help me?

Coordinator
Jun 12, 2011 at 6:51 PM

BlogEngine.Core.Security.CurrentUser.Identity.Name

Jun 12, 2011 at 6:59 PM

Membership.GetUser(0 returns current user as MembershipUser.and is more generic

Unless your extension is for general use, BlogEngine.Core.Security.CurrentUser would be better.