我已将此添加到web配置中:
<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类,它不会找到它。这不是应该在我创建项目时生成的吗?
发布于 2011-05-30 12:52:08
using System.Web.Profile;您导入名称空间了吗?
发布于 2012-05-31 18:27:22
好的。我的页面代码中有名称空间,我的项目是一个网站应用程序(而不是网站),但是我没有得到ProfileCommon类。
https://stackoverflow.com/questions/5625484
复制相似问题