自定义Profile,继承BaseProfile问题

folmos0123456 2008-04-18 07:23:47
本人自定义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的类是否只能读出不能写入
...全文
74 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧