Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7901185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:09:26+00:00 2026-06-03T09:09:26+00:00

I am using Asp.Net/C# .I am using Asp.Net’s built-in Membership Framework .I have a

  • 0

I am using Asp.Net/C#.I am using Asp.Net's built-in Membership Framework.I have a requirement wherein the current(logged-in) user’s name should be displayed in the horizontal menu towards the right side.The aspnet_Users table stores the UserName in the form of some code like ppp001 where as the actual name of the user For Example: John Smith is stored in the table which is linked to aspnet_Users table using a Foreign Key constraint.So my question is how do I display the users name from that table to my menu.Should I use repeater control.
Any suggestions are welcome.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:09:27+00:00Added an answer on June 3, 2026 at 9:09 am

    The simplest way to do it is to store the first name and last name in the profile provider and then use a label or div which has runat=”sever”

    in the web.config

    <profile enabled="true">
        <properties>
            <add name="FirstName" type="string"/>
            <add name="LastName" type="string"/>
        </properties>
    </profile>
    

    then set your div or label

       FirstName.Text = Profile.FirstName;
       LastName.Text = Profile.LastName;
    

    The disadvantage with using the profile provider is that all the profile properties get concatenated into a big string so it’s hard to query against that. The better way to do this is to create your own BasePage class which makes a call to the database to retrieve the first name and last name from a specific table, using the foreign key like you mentioned. I usually set this to a MyLoggedInUser property of the page. That way all your pages can get to it via this.Page.MyLoggedInUser.FirstName, etc..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using ASP.NET membership, if I want to get information for the current user, I
using asp.net and c# membership provider how to check if the user is registered
Using ASP.Net MVC on my Site.Master I have: <head runat=server> <title><asp:ContentPlaceHolder ID=TitleContent runat=server />
Using ASP.NET 3.5 and jQuery UI. When a user clicks the Search button, a
Using asp.net 3.5 Gridview control, visual studio 2008. I have played with all the
Using ASP.NET MVC 2.0, I have an actionlink that is used for comments on
Using ASP.Net, I have a server control for which i would like to add
Using ASP.NET VB, I have a form with some text boxes and a Gridview.
Using Asp.net and jQuery I have a GridView with a CheckBox column. Right now
using ASP.NET MVC 1.0 and I have a action that returns a JsonResult and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.