Profile ASP.Net Tutorial

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#" %>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    void Page_Load()
    {
        lblFirstName.Text = Default.GetFirstNameFromProfile();
    }



    Show Profile Component


    
    

    First Name:
            id="lblFirstName"
        Runat="server" />