Copied to clipboard

Flag this post as spam?

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


  • Alessio Montesi 8 posts 28 karma points
    Aug 07, 2009 @ 00:54
    Alessio Montesi
    0

    Member properties umbraco 3

    Hi all,

    I've an umbraco3 live site with a registration form.

    I need to integrate a checkbox multiple datatype in member properties.

    In my ascx I've a checkbox list.

    Is possible to populate the checkbox multiple data inside the member profile  and display the right checboxes checked? or getproperty accept only one string parameter?

     

    thank you

    Alessio 

  • Sebastiaan Janssen 4899 posts 14655 karma points MVP admin hq
    Aug 07, 2009 @ 08:19
    Sebastiaan Janssen
    0

    Yes, this is absolutely possible. I am not sure if you'd have to create a custom signup page or if the .NET membership provider can handle this for you though.

    Programatically you can just do something like this:

    newMember.getProperty("checkboxName").Value = checkbox.checked;

    Read more about creating members at nibble.be.

  • Alessio Montesi 8 posts 28 karma points
    Aug 07, 2009 @ 09:47
    Alessio Montesi
    0

    Thank you for your response,

    I've solved.

    My problem was the space on datatype name.

    I'ts generate an

    Object reference not set to an instance of an object

    error.

     

    this is my trunk code:

    cucina is my checkboxlist on registration form

    culinarie is my checkboxe multiple  datatype on umbraco

     

     

    string culinarie = "";

     

     

     

     

    for (int i = 0; i < cucina.Items.Count; i++)

    {

     

    if  (cucina.Items[i].Selected)

    {

    culinarievals += cucina.Items[i].Value.ToString() + 

    ",";

    }

    }

    m.getProperty(

    "culinarie").Value = culinarievals;

     

     

    thank you for the support

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies