Copied to clipboard

Flag this post as spam?

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


  • Eran Meir 401 posts 543 karma points
    Feb 21, 2013 @ 13:41
    Eran Meir
    0

    getting value of DropDownList in code first

    hey, i have a form which i have 

    [Field("Member/Registration", "Details", Mandatory=true, Caption = @"MyDropDown", Type = typeof(DropDownList), Prevalues = new string[] { "test" })]
            public string MyDropDown { get; set; }

     im trying to get MyDropDown value but it get the following string: 257538bc-d74c-4d69-a441-78fcccfb4f51

    is there something i did wrong?

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Feb 21, 2013 @ 13:43
    Tim Geyssens
    0

    Getting the value in the submit method returns the guid? Or at what point are you fetching the value?

  • Eran Meir 401 posts 543 karma points
    Feb 21, 2013 @ 13:46
    Eran Meir
    0

    i override the submit method and in there i'm getting the guid

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Feb 21, 2013 @ 13:55
    Tim Geyssens
    100

    Ok looks like that is a bug, needs to be updated in the codefirst core but as a temp workaround you can use

    using(PreValueStorage pvs = new PreValueStorage())
    {
                    var val = pvs.GetPreValue(new Guid("GUID")).Value;
    }
  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Feb 21, 2013 @ 13:56
    Tim Geyssens
    0

    Hope that is an ok solution for now

    Created the issue on our issue tracker: http://issues.umbraco.org/issue/CON-273 so it will get fixed in a future release

  • Eran Meir 401 posts 543 karma points
    Feb 21, 2013 @ 15:00
    Eran Meir
    0

    thank you, can you think of any workaround that i can use for now?

  • Tim Geyssens 6562 posts 15373 karma points MVP 2x c-trib
    Feb 21, 2013 @ 15:05
    Tim Geyssens
    0

    Yeah check my previous reply :)

    Ok looks like that is a bug, needs to be updated in the codefirst core but as a temp workaround you can use

    using(PreValueStorage pvs =newPreValueStorage())
    {
                   
    var val = pvs.GetPreValue(newGuid("GUID")).Value;
    }
  • Eran Meir 401 posts 543 karma points
    Feb 21, 2013 @ 15:17
    Eran Meir
    0

    oh didn't notice it, thank you :)

  • 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