I was working in a web application. i used my coustom profile provider, but i had not access to my values so i red this and used the @colivier answer .
dynamic profile = ProfileBase.Create(Membership.GetUser().UserName);
string s = profile.GivenName;
profile.Surname = "Smith";
Now my problem is i can not save the profile after setting the values.In
profile.Save();
it gives me the error:
**'ProfileCommon' does not contain a definition for 'save'**
here is the web.config:
<properties >
<add name="UserName" />
<add name="Name" />
<add name="LastName"/>
<add name="Email"/>
<add name="Level"/>
<add name="Disabled"/>
</properties>
</profile>
从错误消息来看,看起来“保存”应该是“保存”(区分大小写)。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.