How to retrieve properties from ASP.NET Membership, Profile? -


in web.config defined property:

<profile>   <properties>     <add name ="creator" type ="system.string"/>           </properties> </profile> 

i can set values property, like

 httpcontext.profile.setpropertyvalue("creator", membership.getuser(user.identity.name).provideruserkey.tostring()); 

but how can value, based on membershipuser? if iterate through membershipusercollection in view, how can display property creator?

 @foreach (membershipuser user in (viewdata["users"] membershipusercollection))  {     //how @user creator?  } 

thank in advance!

profile properties not set on membershipuser object. instead, authenticated user, can use "profile" property directly in code:

profile.creator 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -