title: Not Getting Profile properties in Code Behind
body: <p>I am trying to get Profile properties in the code behind. But I am not getting any intellisence  like <code>Profile.Homephone</code> or <code>Profile.CellPhone</code>. When I try:  </p>
  
  <pre><code>Dim memberprofile As ProfileBase = HttpContext.Current.Profile
  Dim homePhone As String = memberprofile.GetPropertyValue("HomePhone").ToString()
  </code></pre>
  
  <p>I get <code>Data is Null</code>. This method or property cannot be called on Null values error. I have data for current user in the profile Table.
  I get following results in immediate window    </p>
  
  <pre>
  ?HttpContext.Current.Profile.UserName.ToString
  "sub2"
  ?Profile.DefaultProfile.Properties.Count
  2
  ? HttpContext.Current.Profile("HomePhone")
  "" {String}
      String: ""
  </pre>
  
  <p>I  am not able to run property values in page load event.
  This is my web.config file setting:</p>
  
  <pre><code>&lt;profile&gt;
    &lt;providers&gt;
      &lt;clear /&gt;
      &lt;add name="AspNetSqlProfileProvider"   connectionStringName="Primary" applicationName="MyFmNow.com"
   type="System.Web.Profile.SqlProfileProvider"  /&gt;
    &lt;/providers&gt;
    &lt;properties&gt;
      &lt;add name="HomePhone" type="String" /&gt;
      &lt;add name="CellPhone"  type="String"/&gt;
    &lt;/properties&gt;
  &lt;/profile&gt;
  </code></pre>