'System.Web.Security.MembershipUser' does not contain a definition for 'getProperty' and no extension method 'getProperty' accepting a first argument of type 'System.Web.Security.MembershipUser' could be found (are you missing a using directive or an assembly reference?)
Member Properties Question
Hi,
If I've created a new Member using this method:
MembershipUser newMember = Membership.CreateUser(email.Text, email.Text, email.Text);
newMember.IsApproved = true;
//newMember.getProperty("Marketing").Value = marketing.Checked;
Membership.UpdateUser(newMember);
How do I set a Property which has been created called "Marketing" which is a Checkbox (True/False)?
Many thanks,
Peter.
Hi Peter
The following should do the trick !
newMember.getProperty("Marketing").Value = "1";
Being a boolean property the values are 0 or 1
Hope this helps.
Cheers
Nigel
Hi Nigel,
Thanks for your reply.
Unfortunately not, the following error:
'System.Web.Security.MembershipUser' does not contain a definition for 'getProperty' and no extension method 'getProperty' accepting a first argument of type 'System.Web.Security.MembershipUser' could be found (are you missing a using directive or an assembly reference?)
Peter.
Hi Peter
Sorry, my bad - I didn't see that you are using "MembershipUser".
What I was quoting relates to the umbraco.cms.businesslogic.member.Member namespace.
http://our.umbraco.org/wiki/how-tos/membership-providers provides some detail but I am not totally sure how to implement.
I will watch this forum with interest to see if others can enlighten.
In the meantime I might do some further Googling to see if I can track down an answer...
Nigel
is working on a reply...