September 2007 - Posts

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,

Best Way To Ask An Expert On the ASP.NET Forums

After spending almost 1 year contributing in the ASP.NET forums, i collected some tips to help community members to achieve fast, accurate, and direct answers from the experts. Below are the steps

  1.     Choose the appropriate forum where your post belongs
  2.     Supply a descriptive title for your post
  3.     Start your post by mentioning which .NET framework, language, IDE, and which web browser you are using
  4.     Demonstrate what you are trying to achieve
  5.     Demonstrate where your problem relies
  6.     Supply the code that needs to be fixed.
  7.     Go directly straight to the point.
  8.     Write a well formatted post.

The above tips give experts the ultimate option to answer your post directly without having you to wait more time trying to explain your issue.

N.B: Experts you are welcomed to add on the list if you have anything else to be considered.

Hope this helps,

Best Regards

 

This site

Search

Go

This Blog

Syndication

Sponsors

  • MaximumASP
  • Packet Sniffer