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,

Published 17 September 2007 07:33 AM by haissam

Comments

# BasharKokash said on 17 September, 2007 07:52 AM

Sounds great thanks

This site

Search

Go

This Blog

Syndication

Sponsors

  • MaximumASP
  • Breaking News
  • Find a Job
  • Social Bookmarking
    Tidebuy Reviews
    Online Shopping
    asp.net hosting
    UK online local dating