Thread: Wrox Blog
View Single Post
  #2 (permalink)  
Old May 3rd, 2007, 02:57 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

A MembershipUser exposes a ProviderUserKey which is a Guid by default. When a user creates a Blog entry, you can get the ProviderUserKey from Membership.GetUser and store it in your BlogEntry.

Then when you display items you can show or hide the edit link depending on whether the the current item belongs to the current user.

Does this help?

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.