Skip to Content
Beginning ASP.NET 3.5: In C# and VB
book

Beginning ASP.NET 3.5: In C# and VB

by Imar Spaanjaars
March 2008
Intermediate to advanced content levelIntermediate to advanced
766 pages
21h 15m
English
Wrox
Content preview from Beginning ASP.NET 3.5: In C# and VB

16.3. Practical Personalization Tips

The following list provides some personalization tips.

  • Don't try to access the Profile in the Login page, as it isn't available yet. The Profile is instantiated early in the page's life cycle, so when a Login control authenticates you in a Login page, it's too late to associate the user's Profile with the current request. Use the GetProfile method of ProfileCommon instead or redirect to another page.

  • Carefully consider what to store in Profile and what is better stored in your own database tables. Although the single-record structure that ASP.NET uses to store your profile offers you a quick and convenient solution, it's not the most efficient solution, especially not with large amounts of data. Don't try to store complete reviews or even photo albums in Profile, but use your own database tables instead.

  • The current implementation of Profile makes it difficult to query data from the aspnet_Profile database in your own queries. For example, it's difficult to answer queries like: "Give me all users that prefer the Rock genre" because all the data is stored in a single column. To work around these issues, you can use a different Profile provider that you can download from the Sandbox section of the official ASP.NET web site: www.asp.net/downloads/sandbox/.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning ASP.NET 4: in C# and VB

Beginning ASP.NET 4: in C# and VB

Imar Spaanjaars
Professional ASP.NET 3.5 SP1 Edition: In C# and VB

Professional ASP.NET 3.5 SP1 Edition: In C# and VB

Bill Evjen, Scott Hanselman, Devin Rader

Publisher Resources

ISBN: 9780470187593Purchase book