Storing Additional User Information with ASP.NET Membership | CodeGuru

Storing Additional User Information with ASP.NET Membership

Membership, in a nutshell, is a framework built into the .NET Framework that supports creating, authenticating, deleting, and modifying user account information. Each user account has a set of core properties: username, password, email, a security question and answer, whether or not the account has been approved, whether or not the user is locked out […]

Written By
CodeGuru Staff
CodeGuru Staff
Nov 4, 2010
2 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Membership, in a nutshell, is a framework built into the .NET Framework that supports creating, authenticating, deleting, and modifying user account information. Each user account
has a set of core properties: username, password, email, a security question and answer, whether or not the account has been approved,
whether or not the user is locked out of the system, and so on. These user-specific properties are certainly helpful, but they’re
hardly exhaustive–it’s not uncommon for an application to need to track additional user-specific properties. For example, an online
messageboard site might want to also also associate a signature, homepage URL, and IM address with each user account.

There are two ways to associate additional information with user accounts when using the Membership model. The first–which affords
the greatest flexibility, but requires the most upfront effort–is to create a custom data store for this information. If you are
using the SqlMembershipProvider, this would mean creating an additional database table that had as a primary key the UserId value from
the aspnet_Users table and columns for each of the additional user properties. The second option is to use the Profile system, which allows additional user-
specific properties to be defined in a configuration file. See Part 6 for an in-depth look at the Profile system.

This article explores how to store additional user information in a separate database table. We’ll see how to allow a signed in user
to update these additional user-specific properties and how to create a page to display information about a selected user. What’s
more, we’ll look at using ASP.NET Routing to
display user information using an SEO-friendly, human-readable URL like www.yoursite.com/Users/username. To read the entire article,
Storing Additional User Information with ASP.NET Membership, click here.

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.