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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Get Usernames in RolesGet Usernames in Roles
Previous
 
Next
New Post
12/19/2013 8:46 AM
 

Hello, 

I am trying to get the users who belong in a specific user role. Under /Admin/SecurityRoles.aspx after clicking 

on a specific role it shows the "FullName" of the users instead of the "Username" as the label says (DNN 6.2.9).

Therefore, without having to compile the code, I'm trying to get the UserID to pass it to a query in the ascx control. However I can't get the UserID from anywhere on the page. Any ideas?

 

  <asp:TemplateColumn HeaderText="User Name Test">
                    <ItemTemplate>
                        <asp:SqlDataSource runat="server" ID="UsernameData" ConnectionString="<%$ ConnectionStrings:sitesqlserver %>" ProviderName="System.Data.SqlClient" SelectCommand="select top 1 Username from dbo.Users where UserID =@UserID ">
         
                                  <SelectParameters><asp:Parameter Name="UserID"  DefaultValue="xxx" /></SelectParameters>
                      
                         </asp:SqlDataSource>
                        <asp:Listbox id="Labelxx" runat="server" DataTextField="Username" DataSourceID="UsernameData"></asp:Listbox>
                    </ItemTemplate>
                </asp:TemplateColumn>

 
New Post
12/19/2013 9:45 AM
 
I doubt you can retrieve the data source by including a connection string to the source of an asp.net control
columns are usually bound in code behind. Did you check module settings for selecting columns, whether it contains username as well?

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
12/19/2013 10:09 AM
 
Sebastian under http://www.xxx/Admin/SecurityRoles.aspx if I go to the Settings I can see a few options but I'm not sure if the 'Name' refers to the username. (FirstName) refers obviously to the first name. In any case, i have selected everything but only three values appear: Username (which is wrong - its the full name), Effective date, and Expiry date.
 
New Post
12/19/2013 5:40 PM
 
Nectar, I just checked a DNN 6.2.9 (upgraded) Website, and username column displays username, not DisplayName.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Get Usernames in RolesGet Usernames in Roles


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