用了membership,user有一些额外信息想用profile储存,这些信息是在创建用户时就写入,而且是由管理员写入,我baidu了半天,找不到答案,请高手指教下。
另外,我用aspnet_regsql工具生成了数据库,没注意profile选项(好像也没有,数据库里面有profile表),是不是只要在web.config中写点内容就行?我写入了内容,可是在后台输入profile,智能提示没有相应提示,system.web.profile也已经引入,这是怎么回事?一并求教

解决方案 »

  1.   

    web.config中定义profile属性
    <profile>
      <properties>
      <add name="MyProperty" />....
      </properties>
    </profile>
    ProfileCommon 
      

  2.   

    ProfileCommon 在智能提示里也没有,已经在web.config中写了,页面using system.web.profile,智能提示还是没有profilecommon
      

  3.   

    我的web.config:
      <membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
             <providers>
             <clear />
             <add
              name="SqlProvider"
              type="System.Web.Security.SqlMembershipProvider"
              connectionStringName="zkkwConnectionString"
              applicationName="northWind"
              enablePasswordRetrieval="false"
              enablePasswordReset="true"
              requiresQuestionAndAnswer="true" 
               maxInvalidPasswordAttempts="5"
              minRequiredPasswordLength="6"
               minRequiredNonalphanumericCharacters="0"          requiresUniqueEmail="true"
              passwordFormat="Hashed" />
             </providers>
             </membership>
          
              <profile defaultProvider="SqlProvider">
                <providers>
                  <add
                  name="SqlProvider"
                  type="System.Web.Profile.SqlProfileProvider"
                  connectionStringName="zkkwConnectionString" />
                </providers>
                <properties>
                  <add
                  name="kddm"
                  allowAnonymous="true"
                   defaultValue="" />
                  <add
                  name="kaociid"
                  type="Int32"
                  allowAnonymous="true" />
                </properties>
              </profile>
    数据库里有一个表:asp.net_profile