MSPSS: is there life after the helpdesk?

sharing solutions to uncommon IT problems

DotNetNuke: use DNN libraries in a common aspx page – Get the username

leave a comment »


Hello,

We are trying to migrate our portal to DotNetNuke. We have several applications developed in ASP.NET which we don’t want to convert into DNN modules all at once.

What we plan to do is convert only the entry point page from aspx to ascx and keep using all sub web forms modifying as little as we can (for the moment).

Initially we thought we could not retrieve the authenticated user info in non-module pages but actually, as long as the web page (aspx) is a member of the module you can reference to all DNN classes and retrieve whatever info you need.

Here, for example, is how I retrieve the logged in user:

——–

Imports DotNetNuke.Entities.Modules.PortalModuleBase

——–

Dim uinfo As DotNetNuke.Entities.Users.UserInfo = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo()
Label1.Text = uinfo.Username

——–

 

HTH,

Roberto.

Advertisements

Written by zantoro

April 11, 2013 at 7:49 am

Posted in DotNetNuke

Tagged with ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: