<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
当我使用默认的ASP.NET 2.0中的会员管理,当你需要添加某些字段例如增加用户生日,我们可以使用profile来实现此类的功能,profile适合于存储少量的用户数据,用户数据存在数据库中。
使用方法:
在WEB.Confi中添加
<profile>
<properties>
<add
name="RenWuPiShu" type="String" /> //添加的profile字段
</properties>
</profile>
然后只要通过程序给他赋值就可以了
如
protected void Button1_Click(object sender, EventArgs e)
{
this.Profile.RenWuPiShu = TextBox1.Text;
}
调用方式就是
this.Profile.RenWuPiShu就可以了
本文介绍如何在ASP.NET 2.0中利用Profile特性为用户添加自定义字段,例如用户生日等信息,并提供了配置示例及代码实现。

383

被折叠的 条评论
为什么被折叠?



