Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesHelp with IRC chat moduleHelp with IRC chat module
Previous
 
Next
New Post
8/25/2011 9:40 PM
 
cathal connolly wrote:
As youre using a java applet you just need to have a page that shows the applet and param tags i.e. a module that emits these and replaces the param name with your username value would be the easiest i.e.

private UserInfo _currentUser =
                   DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo();

lblApplet.text="...all your fixed values would be here...." + " " + "..all the other fixed values here..."

Alternatively you could add this direct in the skin and use inline code to inject ie <% =_currentUser.UserName.ToString() %>

 

Okay, I've created a module, got the Applet to load and everything, but I'm a little confused on how to pass the Current username to the aspx page.


To make sure I could get the username, I added a label and passed the value to it successfully, but I'm not sure how to put that value through the parameter within the Applet tags.

<param name="nick" value="<% =_currentUser.UserName.ToString() %>" />

That through an error. No details about the error though.


 
New Post
8/25/2011 10:37 PM
 
Woohoo!!! I got it!!!


<param name="nick" value="<percent= HttpContext.Current.Session["sUserName"] percent>" />

 
New Post
8/26/2011 8:11 AM
 
you had the issue with my code example as the _currentUser has to be populated (the first line of code I gave) before it can be used. Anyway Im glad to see you have a workaround (though personally i never use session variables)

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/26/2011 10:27 AM
 
cathal connolly wrote:
you had the issue with my code example as the _currentUser has to be populated (the first line of code I gave) before it can be used. Anyway Im glad to see you have a workaround (though personally i never use session variables)

 When I tried using
private UserInfo _currentUser =
                   DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo();

in the code behind I was getting an error.
Error    2    'DotNetNuke.Entities.Modules.PortalModuleBase.UserInfo' is a 'property' but is used like a 'type'   


 
New Post
8/26/2011 10:54 AM
 
whoops, you can use
UserInfo objUser = UserController.GetCurrentUserInfo();
or
var objUser = UserController.GetCurrentUserInfo();

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesHelp with IRC chat moduleHelp with IRC chat module


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out