Around page 562, I'm following the instructions to create a profile. But after creating the profile elements and compiling the app I can't reference those elements.
In the project's (not web site) root is web.config and I've modified the profile <system.web> section like so:
Code:
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
<properties>
<add name ="favoritetea" allowAnonymous="true"/>
</properties>
</profile>
In the website's defualt.aspx (which is the page first loaded with the master page) I try to set a value for "favoritetea" and it's not happy. No intellisense and on compile an error appears
'favoritetea' is not a member of 'Profile'
Here is that page's onload code:
Code:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Profile.favoritetea = "earl grey"
End Sub
I may be wrong but I discount the fact that I'm using a asp.net project instead of a web site, and that I'm using a masterpage as issues, because it's not a runtime issue, it won't even compile.