代码之家  ›  专栏  ›  技术社区  ›  Vibin Jith

我没有在代码后面得到'Profile'属性

  •  1
  • Vibin Jith  · 技术社区  · 15 年前

    我在web.config中添加了一些配置文件属性:

    <profile automaticSaveEnabled ="true">
            <properties>
              <add name="NumVisits" type="System.Int32"/>
              <add name="UserName" type="System.String"/>
              <add name="Gender" type="bool"/>
              <add name="Birthday" type="System.DateTime"/>
             </properties> 
          </profile>
    

    但是,当我试图在后面的代码中访问属性时 存在。以下代码不起作用(说firstname不是属性):

    简介.性别 我已经重建了解决方案。我正在使用VB.NET(3.5)

    1 回复  |  直到 15 年前
        1
  •  0
  •   Saar    15 年前

    另一种检索配置文件属性值的方法如下。