2013-10-26 36 views
0

我在Web應用程序中工作。我使用我的coustom配置文件提供程序,但我沒有訪問我的值,所以我紅色this並使用@colivier答案。Asp.net:'ProfileCommon'不包含'save'的定義

dynamic profile = ProfileBase.Create(Membership.GetUser().UserName); 
string s = profile.GivenName; 
profile.Surname = "Smith"; 

現在我的問題是我不能保存配置文件設置values.In

profile.Save()之後;

它給我的錯誤:

**'ProfileCommon' does not contain a definition for 'save'** 

這裏是web.config中:

<properties > 
    <add name="UserName" /> 

    <add name="Name" /> 

    <add name="LastName"/> 

    <add name="Email"/> 

    <add name="Level"/> 

    <add name="Disabled"/> 

    </properties> 

</profile> 

回答

0

來看該錯誤消息,它看起來像「拯救'應該是'保存'(區分大小寫)。

相關問題