Copied to clipboard

Flag this post as spam?

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


  • Dean Beasley 11 posts 34 karma points
    Aug 24, 2009 @ 19:01
    Dean Beasley
    0

    umbraco Member Controls (Generic Property)

    Hi,

    I installed the umbraco Member Control and managed to create a new member using this. However, I want to include fields such as  "address 1", "address 2" etc. I have added these new fields in the Member Type but I need to know what's the easiest way to populate these when a user enters their details. Here is the code I have so far:

     

    <%@ Control Language="c#" AutoEventWireup="false" Codebehind="umbRegister.ascx.cs" Inherits="dguUmbracoControls.tilmelding" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
    <asp:ValidationSummary id="ValidationSummary1" runat="server"></asp:ValidationSummary>
    <asp:Literal id="additionalErrors" runat="server"></asp:Literal>
    <table border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td class="dguNormal" align="right"><b>Name</b></td>
            <td>&nbsp;&nbsp;</td>
            <td><asp:TextBox ID="name" Runat="server" CssClass="umbSignUpText" Width="200"></asp:TextBox>
                <asp:RequiredFieldValidator id="RequiredFieldValidator1" runat="server" ErrorMessage="Name is mandatory" ControlToValidate="name"
                    Display="None"></asp:RequiredFieldValidator></td>
        <tr>
        <tr>
            <td class="dguNormal" align="right"><b>Email</b></td>
            <td>&nbsp;&nbsp;</td>
            <td><asp:TextBox ID="email" Runat="server" CssClass="umbSignUpText" Width="200"></asp:TextBox>
                <asp:RequiredFieldValidator id="RequiredFieldValidator2" runat="server" ErrorMessage="Email is mandatory" ControlToValidate="email"
                    Display="None"></asp:RequiredFieldValidator></td>
        <tr>
        <tr>
            <td class="dguNormal" align="right"><b>Email Confirm</b></td>
            <td>&nbsp;&nbsp;</td>
            <td><asp:TextBox ID="emailConfirm" Runat="server" CssClass="umbSignUpText" Width="200"></asp:TextBox>
                <asp:CompareValidator id="CompareValidator1" runat="server" ErrorMessage="Email is different" ControlToCompare="email"
                    ControlToValidate="emailConfirm" Display="None"></asp:CompareValidator></td>
        <tr>
        <tr>
            <td class="dguNormal" align="right"><b>Username</b></td>
            <td>&nbsp;&nbsp;</td>
            <td><asp:TextBox ID="username" Runat="server" CssClass="umbSignUpText" Width="100"></asp:TextBox>
                <asp:RequiredFieldValidator id="RequiredFieldValidator4" runat="server" ErrorMessage="Username is mandatory"
                    ControlToValidate="username" Display="None"></asp:RequiredFieldValidator></td>
        <tr>
        <tr>
            <td class="dguNormal" align="right"><b>Password</b></td>
            <td>&nbsp;&nbsp;</td>
            <td><asp:TextBox ID="password" Runat="server" CssClass="umbSignUpText" Width="100" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator id="RequiredFieldValidator5" runat="server" ErrorMessage="Password is mandatory"
                    ControlToValidate="password" Display="None"></asp:RequiredFieldValidator></td>
        <tr>

        <tr>
            <td class="dguNormal" align="right"><b>Address 1</b></td>
            <td>&nbsp;&nbsp;</td>
            <td><asp:TextBox ID="Address1" Runat="server" CssClass="umbSignUpText" Width="100"></asp:TextBox></td>
        <tr>

        <tr>
            <td colspan="3" align="center"><br>
                <asp:Button id="ButtonSignup" runat="server" Text="Sign Up"></asp:Button></td>
        </tr>
    </table>

  • bob baty-barr 1180 posts 1294 karma points MVP
    Aug 24, 2009 @ 19:50
    bob baty-barr
    1

    what about your code behind? to actually update the member? i was just working on some member updating stuff this weekend... here is a great post regarding member updating...

    http://www.aaron-powell.com/blog/july-2009/umbraco-member-profiles.aspx

    pretty much outlines everything you need :P

    holy crap! i just answered a post about user controls... i think hell just froze over :P

  • Dean Beasley 11 posts 34 karma points
    Aug 24, 2009 @ 22:13
    Dean Beasley
    0

    lol cool, intersting link- im going to work through it and let you know how I get on.

    Thanks

  • Dean Beasley 11 posts 34 karma points
    Aug 25, 2009 @ 12:25
    Dean Beasley
    0

    Ok, before complicating things by inheriting and extending code I decided to investigate things further. Ideally I wanted to get the extra fields showing up with my installed UmbracoMebershipControls v.1.0. I searched and searched for the entire source code... no luck, however I found this post :http://forum.umbraco.org/yaf_postst7878_umbracoMemberControls.aspx which talks about ver 0.3 doing exatcly what I needed.

    After reading that post I decided to uninstall UmbracoMebershipControls v 1.0 and install ver 0.3 from  http://www.codeplex.com/umbracoext/SourceControl/changeset/view/21521

    hey presto! my custom tab and fields rendered on my register form!

    Now im confused, ver 0.3 allows you to add extra fields but v1.0 dont? unless v1.0 pulls the fields and im missing something.

    Does anyone know where to get the source code for UmbracoMebershipControls  v1.0? My plan is to merge the Extra field functionality from 0.3 with 1.0

    Thanks again

  • Erik Ernst 70 posts 90 karma points
    Feb 28, 2010 @ 16:17
    Erik Ernst
    0

    Hi Dean,

    Did you ever find the source code?

Please Sign in or register to post replies

Write your reply to:

Draft