自己顶一下,现在已经找出值存储的规则,还在想办法返回数据,从国外的一个站点上找出一个可以分析这些值的SQL,但是希望能找出其他的方法。

解决方案 »

  1.   

    Custom 一个profile provider.
      

  2.   

    去下载一个petshop 4,可以很清楚的研究一下,老实说这个东西不怎么好用一个很简单的例子,登陆前和登陆后的状态,让我烦了好几天他就相当于一个客户端的cookie
      

  3.   

    ProfileCommon pc = Profile.GetProfile(this.User.Identity.Name);txtUser.Text = pc.truename ;
    DropDownList1.SelectedValue = pc.sex ;
    txtAdddress.Text = pc.address ;        
      

  4.   


     
    public List<UserInfomation> GetUserInfomationCollection()
    {        
            List<UserInfomation> list = new List<UserInfomation>();
            
            //获取成员资格的所有用户
            MembershipUserCollection users = Membership.GetAllUsers();        foreach (MembershipUser user in users)
            {
                //获取每个用户的profile信息
                ProfileCommon profile = (ProfileCommon)ProfileBase.Create(user.UserName);
                list.Add(new UserInfomation(user.UserName, user.Address, profile.truename));        }
            return list; }
    我的Profile文件是这样的:<profile defaultProvider="MyProfileProvider" automaticSaveEnabled="true">
          <providers >
            <add name="MyProfileProvider"  type="System.Web.Profile.SqlProfileProvider" connectionStringName="SMSConnectionString" applicationName="/"/>
          </providers>
          <properties>
            <add name="sex" type="string"   allowAnonymous="true"/>
            <add name="address" type="string"  allowAnonymous="true"/>
            <add name="province" type="string"  allowAnonymous="true"/>
            <add name="city" type="string"  allowAnonymous="true"/>
            <add name="postcode" type="Int32"  allowAnonymous="true"/>
            <add name="truename" type="string" allowAnonymous="true"/>
          </properties>
    </profile>