0

我已将此添加到网络配置中:

  <profile enabled="true" >

  <properties >

    <add name="Gender" type="string"/>
    <add name="Age" type="Int32"/>
  </properties>

  <providers>
    <clear/>
    <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
  </providers>
</profile>

但是,如果我尝试使用 ProfileCommon 类,它不会找到它。这不应该在我使用项目时生成吗?

4

2 回答 2

0

行。我的页面代码隐藏中有命名空间,我的项目是一个 WEB 应用程序(不是 WEB 站点),但我没有得到 ProfileCommon 类。

于 2012-05-31T10:27:22.160 回答
-1
using System.Web.Profile;

您是否导入了命名空间?

于 2011-05-30T04:52:08.180 回答