title: Asp.net Membership Profile FirstName and LastName (Not declared. It may be inaccessible due to its protection level )
body: <p>When i created a profile and when i add items it always says not declared in the code behind!!</p>
  
  <p>I tried to change the Framework of the project from Framework 4.0 to Framework 3.5 and it still didn't work. </p>
  
  <p>It says FirstNamep , LastNamep are not declared .</p>
  
  <p>And in the <strong>Web.config</strong> :  </p>
  
  <pre><code>   &lt;profile defaultProvider="CustomProfileProvider" enabled="true"&gt;
  
     &lt;providers&gt;
  
    &lt;/providers&gt;
  
    &lt;!-- Define the properties for Profile... --&gt;
    &lt;properties&gt;
        &lt;add name="FirstNamep" type="String" /&gt;
        &lt;add name="LastNamep" type="String" /&gt;
  
    &lt;/properties&gt;
  &lt;/profile&gt;
  </code></pre>
  
  <p><strong>Behind the Code:</strong> </p>
  
  <pre><code>    Profile.FirstNamep = FirstNameTextBox.Text 
      Profile.LastNamep = LastNameTextBox.Text
  </code></pre>