Note that there are some explanatory texts on larger screens.

plurals
  1. POWeb Application Project - how to use ProfileCommon
    primarykey
    data
    text
    <p>I am porting a site I had developed on an old box across to a new dev env. I have not just copied all the files as I didn't have a great file structure and some parts of the code needed to be removed as I went along.</p> <p>Originally I had created a website (File -> New -> Web Site). I wanted a file structure something like:</p> <p><a href="https://stackoverflow.com/questions/446017/popular-folder-structure-for-build">Popular folder structure for build</a></p> <p>So I created a new blank solution so the sln file was on its own, then added projects (various DLL projects) and am ASP.NET Web Application.</p> <p>This last part seems to have caused me a few issues, I am now getting the following error:</p> <p>"The type or namespace name ' ProfileCommon' could not be found".</p> <p>I found the following page:</p> <p><a href="http://weblogs.asp.net/joewrobel/archive/2008/02/03/web-profile-builder-for-web-application-projects.aspx" rel="nofollow noreferrer" title="Link to possible solution">http://weblogs.asp.net/joewrobel/archive/2008/02/03/web-profile-builder-for-web-application-projects.aspx</a></p> <p>It seems a bit long winded and I was hoping someone might know of a better solution.</p> <p>I am trying to use the ProfileCommon with the CreateUser Wizard as I add a little extra information into it.</p> <pre><code>protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e) { // Create an empty Profile for the newly created user ProfileCommon p = (ProfileCommon)ProfileCommon.Create(CreateUserWizard1.UserName, true); // Populate some Profile properties off of the create user wizard p.CurrentLevel = Int32.Parse(((DropDownList)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("clevel")).SelectedValue); // Save profile - must be done since we explicitly created it p.Save(); } </code></pre> <p>Web.config:</p> <pre><code>&lt;profile enabled="true"&gt; &lt;properties&gt; &lt;add name="CurrentLevel" type="Int32"/&gt; &lt;/properties&gt; &lt;/profile&gt; </code></pre> <p>If there is another way to add this extra information into the creation wizard, or just a better way of setting extra info to a new user then I am all ears and would be very grateful.</p> <p>Thanks for the help and advice.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload