自定义Profile,继承BaseProfile问题
本人自定义Profile继承ProfileBase代码如下:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Profile;
/// <summary>
/// ProfileClass 的摘要说明
/// </summary>
public class ProfileClass:ProfileBase
{
private string _firstName="firstName";
[SettingsAllowAnonymous(true)]
public string FirstName
{
get { return _firstName; }
set { _firstName = value; }
}
private string _secondName="secondName";
[SettingsAllowAnonymous(true)]
public string SecondName
{
get { return _secondName; }
set { _secondName = value; }
}
}
在Web.config内设置如下
<authentication mode="Forms" />
<anonymousIdentification enabled="true"/>
<profile inherits="ProfileClass"/>
问题:只能读取定义的Profile属性,而不能写入,请问继承ProfileBase的类是否只能读出不能写入