how to get current UserId, UserName?

Topics: ASP.NET 2.0, Controls
Jun 12, 2011 at 5:28 PM
Edited Jun 12, 2011 at 5: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 7:51 PM

BlogEngine.Core.Security.CurrentUser.Identity.Name

Jun 12, 2011 at 7: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.