1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Profile data not persisted

Profile data not persisted

5 posts, 0 answered
  1. Daniel Svensson
    Daniel Svensson avatar
    12 posts
    Registered:
    31 Aug 2009
    07 Sep 2009
    Link to this post
    Hi,

    I have watched the webinar about Role and membership and he talked about adding new profile fields to the Users.apsx and MyProfile.aspx.

    I have followed these steps to include an additional field, and it shows up in the pages but when i save the new information for the user the data is not persisted.

    Here is the code from the web.config file:

    <profile defaultProvider="Sitefinity">
    <providers>
    <clear />
    <add name="Sitefinity" connectionStringName="DefaultConnection" applicationName="/" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess" />
    </providers>
    <properties>
            <add name="FirstName" />
            <add name="LastName" />
            <add name="Position" />
            <add name="DefaultLoginPage" /> <!-- This is the added field -->
            <add name="Photo_Hidden" />
            <add name="Photo" defaultValue="~/Sitefinity/Common/Images/defaultavatar.gif" />
            <group name="InstantMessenger">
              <add name="IM_Type" />
              <add name="IM_Value" />
            </group>
            <group name="Phone">
              <add name="Value" />
              <add name="Type" />
            </group>
    </properties>
    </profile>

    Here is the code added to Users.aspx and MyProfile.aspx. It's added in Edit and Insert template of Users.aspx at the location i want it to appear. And they show in pages when runned. The added <li> code is the same in both files.

    <li>
    <cc2:FieldLabel ID="lblDefaultLoginPage" runat="server" Text="DefaultLoginPage *  TargetID="DefaultLoginPage">
    </cc2:FieldLabel>
    <asp:TextBox ID="DefaultLoginPage" runat="server" ValidationGroup="CreateUser"></asp:TextBox>
    <asp:RequiredFieldValidator ID="DefaultLoginPageRequired" runat="server" ControlToValidate="DefaultLoginPage" ErrorMessage="A default login page is required." ToolTip="A default login page is required." ValidationGroup="CreateUser" Display="Dynamic" CssClass="validMessage"><strong>
    <asp:Literal ID="Literal15" runat="server" Text="A default login page is required" /></strong </asp:RequiredFieldValidator>
    </li>


    Does anyone see what's wrong here? It should work, it worked in the webinar :) When i save the changes it says the changes are succesfully updated!

    Daniel Svensson
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    07 Sep 2009
    Link to this post
    Hi Daniel Svensson,

    Could you check whether you have added your controls under

    <cc1:ManageProfile runat="server" ID="manageProfile" Mode="Edit"
       <EditTemplate>  
             ...... 
                 ..... 
    </cc1:ManageProfie> 
     
    <cc1:ManageProfil 
    <cc1:ManageProfile ID="manageProfile" runat="server" Mode="Insert"
        <InsertTemplate> 
     
          ..... 
            .....     
    </cc1:ManageProfile> 

    You could also take a look at telerik_UserMetaInfo to see whether the value is actually persisted and the problem is only related to showing the data.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Daniel Svensson
    Daniel Svensson avatar
    12 posts
    Registered:
    31 Aug 2009
    07 Sep 2009
    Link to this post
    Hi!

    No they are not under these sections, oupps and i know why now.
    It's just that i wanted that property under the membership info box.

    Get back to you about this, have to alter the code.

    /Daniel
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    07 Sep 2009
    Link to this post
    Hi Daniel Svensson,

    Let me know if the problem persists after modifying the code. Once you add the TextBox under the sections above the data should be persisted.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Daniel Svensson
    Daniel Svensson avatar
    12 posts
    Registered:
    31 Aug 2009
    07 Sep 2009
    Link to this post
    Hi,

    It works now when they are under the rigth sections in the code ! Thanks!

    /Daniel
Register for webinar
5 posts, 0 answered