ASP.NET 2.0会员管理(membership)中使用profile

<script type="text/javascript"> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script><script> var tixa_nadInIframe=false; var tixa_nadRowCount=1; var tixa_nadColumnCount=4; var tixa_nadHeight=85; var tixa_nadWidth=680; var tixa_nadBorderColor='9178E7'; var tixa_nadBgColor='F0ECFF'; var tixa_nadTitleColor='0000ff'; var tixa_nadDescColor='000000'; var tixa_adType='text'; </script><script src='http://union.narrowad.com/proxy/narrowad.jsp?wid=11978&cid=24072'></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

就可以了

<script> var tixa_wadRowCount=1; var tixa_wadColumnCount=4; var tixa_wadHeight=85; var tixa_wadWidth=680; var tixa_wadBorderColor='336699'; var tixa_wadBgColor='F7F3F7'; var tixa_wadTitleColor='0000ff'; var tixa_wadDescColor='000540'; var tixa_adType='text'; </script><script src='http://union.narrowad.com/proxy/widead.jsp?wid=11978&cid=24072'></script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值