ASP.NET Tutorial/Configuration/Profile
Версия от 15:30, 26 мая 2010; (обсуждение)
Creating personalization properties in the web.config file
<configuration>
<system.web>
<profile>
<properties>
<add name="FirstName" />
<add name="LastName" />
<add name="LastVisited" />
<add name="Age" />
<add name="Member" />
</properties>
</profile>
<authentication mode="Windows" />
</system.web>
</configuration>
Defining types for personalization properties
<configuration>
<system.web>
<profile>
<properties>
<add name="FirstName" type="System.String" />
<add name="LastName" type="System.String" />
<add name="LastVisited" type="System.DateTime" />
<add name="Age" type="System.Integer" />
<add name="Member" type="System.Boolean" />
</properties>
</profile>
<authentication mode="Windows" />
</system.web>
</configuration>
The Profile is defined in the web configuration file
<configuration>
<system.web>
<profile>
<properties>
<add
name="MasterPageFile"
defaultValue="Dynamic1.master" />
</properties>
</profile>
</system.web>
</configuration>