MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

WHEN SOMEONE LOGGED IN, REGISTER (UPDATE ACCOUNT) FORM DOESN'T SHOW UP  (Mono Support )

Viewed 15524 time(s), 3 post(s) 11/14/2013 11:14:42 AMby sonap

Related topics

sonap

sonap

11/14/2013 11:14:42 AM
Hello,

I face this problem:
When I am logged in my monoX site and I access the /membership/register.aspx page the update account form is gone (e.g. I get the page exactly as it should be exeprt from the account form.

here are my pages:
<%@ Page
    Language="C#"
    MasterPageFile="/App_MasterPages/ClipFlair/Login.master"
    AutoEventWireup="true"
    Inherits="MonoSoftware.MonoX.Pages.Register"
    Codebehind="Register.aspx.cs" %>
 
<%@ MasterType TypeName="MonoSoftware.MonoX.BaseMasterPage" %>   
<%@ Register TagPrefix="MonoX" TagName="Membership" Src="/MonoX/ModuleGallery/Membership/MembershipEditor.ascx" %>
<%@ Register TagPrefix="MonoX" TagName="LoginSocial" Src="/MonoX/ModuleGallery/LoginSocial.ascx" %>
<%@ Import Namespace="MonoSoftware.MonoX.Resources"%>
 
<asp:Content ContentPlaceHolderID="cp" Runat="Server">
    <div class="fancybox-container">
        <div class="row-fluid">
            <div class="span6 clearfix">      
                <MonoX:Membership runat="server" ID="ctlMembershipEditor" />
            </div>
            <div class="span6 clearfix" style="position: relative;">
                <div id="rowRPX" runat="server" Visible="<% $Code: MonoSoftware.MonoX.ApplicationSettings.EnableUserRegistration %>">
                    <!--<div class="or-use">
                        <hr />
                    </div>-->
                    <div class="user-account login-social" >
                        <MonoX:LoginSocial runat="server" ID="ctlLoginSocial" />
                        <div class="italic-style"><asp:Literal ID="Literal1" runat="server" Visible="<% $Code: MonoSoftware.MonoX.ApplicationSettings.EnableUserRegistration %>" Text="<% $Code: PageResources.Login_RpxWarning %>"></asp:Literal></div>
                    </div>
                    <div class="gotoLogin">
                        <p>Already a user? Sign in <a href="../Login.aspx">here</a>.</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
And the editor module:

<%@ Control
    Language="C#"
    AutoEventWireup="true"
    Inherits="MonoSoftware.MonoX.ModuleGallery.MembershipEditor" Codebehind="MembershipEditor.ascx.cs" %>
 
<%@ Import Namespace="MonoSoftware.MonoX.Resources"%>
 
<%@ Register Src="/MonoX/Controls/TimeZonePicker.ascx" TagPrefix="monox" TagName="TimeZonePicker" %>
 
<div class="user-account">
    <!--CLIPFLAIR-->
    <h3><%= Page.User.Identity.IsAuthenticated ? DefaultResources.MembershipEditor_Title_UpdateAccount : DefaultResources.MembershipEditor_Title_CreateAccount %></h3>
    <div class="input-form">
        <dl>
            <dd id="Div1" runat="server">
                <asp:ValidationSummary ID="validationSummary" CssClass="validation-summary" runat="server" />
            </dd>
            <dd class="clearfix">
                <label class="inline-label" for="<%= txtUserName.ClientID %>"><%= DefaultResources.MembershipEditor_UserName %></label>
                <div class="control-holder">
                    <img runat="server" src="/App_Themes/ClipFlair/img/icon-user-name.png" alt="User name icon" />
                    <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
                    <asp:Label CssClass="disabled" ID="lblUserName" runat="server"></asp:Label>
                </div>
                <asp:RequiredFieldValidator ID="vldRequiredUserName" runat="server" ControlToValidate="txtUserName" Text="!" SetFocusOnError="true" CssClass="validator ValidatorAdapter" Display="Dynamic" />
                <asp:CustomValidator ID="vldCustomUserName" runat="server" ControlToValidate="txtUserName" Text="!" SetFocusOnError="true" CssClass="validator ValidatorAdapter" Display="Dynamic" />
            </dd>
            <dd class="clearfix">
                <label class="inline-label" for="<%= txtEmail.ClientID %>"><%= DefaultResources.MembershipEditor_Email %></label>
                <div class="control-holder">
                    <img id="Img2" runat="server" src="/App_Themes/ClipFlair/img/icon-mail-activation.png" alt="Password icon" />
                    <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                </div>
                <asp:RequiredFieldValidator ID="vldRequiredEmail" runat="server" ControlToValidate="txtEmail" Text="!" SetFocusOnError="true" CssClass="validator ValidatorAdapter" Display="Dynamic" />
                <asp:RegularExpressionValidator ID="vldRegexEmail" runat="server" ControlToValidate="txtEmail" Text="!" SetFocusOnError="true" CssClass="validator ValidatorAdapter" Display="Dynamic" />
            </dd>
            <dd class="clearfix">
                <label class="inline-label" for="<%= txtPassword.ClientID %>"><%= DefaultResources.MembershipEditor_Password %></label>
                <div class="control-holder">
                    <img runat="server" src="/App_Themes/ClipFlair/img/icon-pwd.png" alt="Password icon" />
                    <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
                </div>
                <asp:RequiredFieldValidator ID="vldRequiredPassword" runat="server" ControlToValidate="txtPassword" Text="!" SetFocusOnError="true" CssClass="validator ValidatorAdapter" Display="Dynamic" />
            </dd>
            <dd class="clearfix">
                <label class="inline-label" for="<%= txtRepeatPassword.ClientID %>"><%= DefaultResources.MembershipEditor_RepeatPassword %></label>
                <div class="control-holder">
                    <img runat="server" src="/App_Themes/ClipFlair/img/icon-pwd.png" alt="Password icon" />
                    <asp:TextBox ID="txtRepeatPassword" runat="server" TextMode="Password"></asp:TextBox>
                </div>
                <asp:RequiredFieldValidator ID="vldRequiredRepeatPassword" runat="server" ControlToValidate="txtRepeatPassword" Text="!" SetFocusOnError="true" CssClass="validator ValidatorAdapter" Display="Dynamic" />
                <asp:CompareValidator ID="vldCompareRepeatPassword" runat="server" ControlToValidate="txtRepeatPassword" Text="!" SetFocusOnError="true" ControlToCompare="txtPassword" Operator="Equal" CssClass="validator ValidatorAdapter" Display="Dynamic"></asp:CompareValidator>
            </dd>
            <dd class="clearfix">
                <label class="inline-label" for="<%= ddlTimeZone.ClientID %>"><%= DefaultResources.MembershipEditor_TimeZone %></label>
                <div class="control-holder">
                    <img runat="server" src="/App_Themes/ClipFlair/img/icon-timezone.png" alt="Password icon" />
                    <monox:TimeZonePicker id="ddlTimeZone" runat="server"></monox:TimeZonePicker>
                </div>
            </dd>
            <asp:PlaceHolder ID="plhRememberMe" runat="server">
                <dd class="offset my_checkbox"">
                    <asp:CheckBox ID="chkRememberMe" runat="server" />
                    <label for="<%= chkRememberMe.ClientID %>"></label>     
                    <span><%= DefaultResources.MembershipEditor_RememberMe %></span>                    
                </dd>
            </asp:PlaceHolder>
            <dd class="offset">
                <asp:Label ID="labInfo" runat="server"></asp:Label>
            </dd>
        </dl>
    </div>
    <!--CLIPFLAIR-->
    <div style="float:right;">
        <MonoX:StyledButton ID="btnCreateAccount" runat="server" CssClass="main-button submit-btn"></MonoX:StyledButton>
        <MonoX:StyledButton ID="btnUpdateAccount" runat="server" CssClass="update-btn"></MonoX:StyledButton>      
    </div>
</div>
I don't see something wrong in my code though.

I would appreciate any help :)

Panos
This content has not been rated yet. 
475 Reputation 52 Total posts
khorvat

khorvat

11/14/2013 11:15:18 PM
Hi,

Register page is just a "Demo" page in MonoX and therefor it's setup just to be used for registering the users not editing their accounts. So you will have to take a look at the code and change the setup of the MembershipEditor control in order to update the user account. You can find the Register page source code on GitHub.

Let us know if you need more information regarding this.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts
sonap

sonap

11/15/2013 8:50:49 AM
Thank you! I will check it out :)
This content has not been rated yet. 
475 Reputation 52 Total posts