Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ambert van Unen 54 posts 96 karma points
    May 25, 2011 @ 10:35
    Ambert van Unen
    0

    User change password

    Greetings!

    First of all, I´m relatively new to all of this, but I do have some common sense ;)

    For the nForum I wanted to add a password field to the EditProfile.aspx.

    So I added the following tot he source :

                    <dt><label for="<%= tbPassword.ClientID %>">Wachtwoord</label></dt>
                    <dd><asp:TextBox ToolTip="Enter your new password" CssClass="required password" ID="tbPassword" runat="server" /></dd>

    And this tot he code behind

      private void LoadProfile()
            {
                if (CurrentMember == null | IsBanned)
                {
                    membereditprofile.Visible = false;
                }
                else
                {
                    //We have a Member logged in fill the data
                    tbLoginName.Text = CurrentMember.LoginName;
                    tbEmail.Text = CurrentMember.Email;
                    tbName.Text = CurrentMember.Text;
                    tbPassword.Text = CurrentMember.Password;
                }
            }
    
            protected void BtnSubmitClick(object sender, EventArgs e)
            {
                btnSubmit.Enabled = false;
    
                CurrentMember.Text = tbName.Text;
                CurrentMember.LoginName = tbLoginName.Text;
                CurrentMember.Email = tbEmail.Text;
                CurrentMember.Password = tbPassword.Text;
    
                //Save member
                CurrentMember.Save();
    
                //Generate member Xml Cache
                CurrentMember.XmlGenerate(new System.Xml.XmlDocument());
    
                var msgBox = (MessageBox)Helpers.FindControlRecursive(Page, "msgBox");
                msgBox.ShowSuccess("Profile updated");

    Now after I upload the nforum.dll i´m getting the following error :

     

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

    Parser Error Message: Could not load type 'nForum.usercontrols.nForum.includes.MainMessage'.

    Source Error: 

    Line 1:  <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MainMessage.ascx.cs" Inherits="nForum.usercontrols.nForum.includes.MainMessage" %>
    Line 2:  <%@ Register src="MessageBox.ascx" tagname="MessageBox" tagprefix="nforum" %>

     


    What I also think is odd.. the new DLL is 45kb in size, the old one was 55.8Kb in size... Has someone before me changed some stuff perhaps?

  • Ambert van Unen 54 posts 96 karma points
    May 25, 2011 @ 10:51
    Ambert van Unen
    0

    hmm...Seems I have a version mismatch between the source I downloaded from their 'download source' link and the 1.2 release source.. Can't use Member.Password in 1.2 release it seems

  • bob baty-barr 1180 posts 1294 karma points MVP
    Dec 06, 2011 @ 20:49
    bob baty-barr
    0

    has anyone got this working that they could help me out with??? i know it should be simple, but my dev skills are not so hot.

  • Martin Skov Nielsen 22 posts 47 karma points
    Mar 07, 2013 @ 21:50
    Martin Skov Nielsen
    0

    The code works fine! :-D Thank you for an easy solution to the problem!

  • Ambert van Unen 54 posts 96 karma points
    Mar 08, 2013 @ 14:56
    Ambert van Unen
    0

    Did we... Solve anything ? :-) Basically it was a version mismatch.. :P

Please Sign in or register to post replies

Write your reply to:

Draft