Mega Code Archive
Profile object retrieved from the current HttpContext object must be case to a ProfileCommon object
File: Web.Config
File: App_Code\Default.cs
using System;
using System.Web;
using System.Web.Profile;
public class Default
{
public static string GetFirstNameFromProfile()
{
ProfileCommon profile = (ProfileCommon)HttpContext.Current.Profile;
return profile.firstName;
}
}
File: Default.aspx
<%@ Page Language="C#" %>
Show Profile Component