Add Personalization properties to your application

To add new properties to the Profile property accessed through the Page

class, you can modify the web.config. example below

<system.web>
   <profile automaticSaveEnabled="true" >
      <properties>
         <add name="Name" type="System.String"/>
         <add name="DateOfBirth" type="System.DateTime"/>
      </properties>
   </profile>
</system.web>

The ASP.NET compiler will add the above two added properties to the ProfileCommon class which is being access by the Profile Property of the page class.


protected void Page_Load(object sender, EventArgs e)
{
   if(Profile.Name == null)
    {
 Response.Write(Profile.Name);
    }
}


HTH,
Best Regards,

Comments

# re: Add Personalization properties to your application

Monday, September 17, 2007 7:52 AM by BasharKokash

Sounds great thanks

The leading UI suite for ASP.NET - Telerik radControls
Outstanding performance. Full ASP.NET AJAX support. Nearly codeless development.