So I have read almost all post over the internet, and I cannot figure out how to load profiles in a webpage. I have created a registration page and added some user steps into the registration page. When i sace the data, it will save all the profile stuff into the profile db that asp.net creates. however, when I try and call the user profile in my profile.aspx page, it will not load. Right now i'm trying to only load an image and just the name. Can you please help me and tell me what i'm doing wrong. thanks!!!!

web.config

<profile enabled="true">
      <providers>        
      </providers>
      <properties>
        <add name="RecordNumber" type="Int32"/>
        <add name="Prefix" type="string"/>
        <add name="FirstName" type="string"/>
        <add name="MiddleName" type="string"/>
        <add name="LastName" type="string" />
        <add name="Suffix" type="string"/>
        <add name="BrotherType" type="string"/>
        <add name="Address1" type="string"/>
        <add name="Address2" type="string"/>
        <add name="Address3" type="string"/>
        <add name="city" type="string" />
        <add name="state" type="string"/>
        <add name="PrimaryEmail"  type="string"/>
        <add name="SecondaryEmail"  type="string" />
        <add name="PhoneNumber"  type="string" />
        <add name="CellPhoneNumber"  type="string" />
        <add name="CellPhoneProvider" type="string" />
        <add name="InitiationDate"  type="DateTime" />
        <add name="PledgeDate" type="DateTime" />
        <add name="BirthDate" type="DateTime" />
        <add name="ProfileImage" type="string"/>     

      </properties>
    </profile>

profile.aspx.cs

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.Profile;

public partial class Users_Profile : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {   
        ProfileImage.ImageUrl = Profile.ProfileImage;
        lblName.Text = Profile.FirstName + " " + Profile.LastName;
    }
}

Profile.aspx

<asp:Content ID="SheetContent" ContentPlaceHolderID="SheetContentPlaceHolder" Runat="Server">


    <table class="style1">
        <tr>
            <td colspan="2" class="style2">
                <asp:Image ID="ProfileImage" runat="server" Height="100px" Width="100px" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblName" runat="server"></asp:Label>
            </td>
            <td>
                &nbsp;</td>
        </tr>
    </table>


    <br />


</asp:Content>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.