Copied to clipboard

Flag this post as spam?

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


  • Valentin Valev 2 posts 72 karma points
    Mar 16, 2020 @ 12:36
    Valentin Valev
    0

    HasValue is not available within Umbraco

    Hi All,

    I am currently working on a project and one of the requirements is to have a count 0 to 3 where 3 is the maximum and then account is locked. So 3 attempts and on the 3rd account is locked. I have the failed password attempts working on the backoffice in umbraco but for some reasons it does not let me grab the value of that label. I can only get the name of the lable umbracoFailedPasswordAttempts but not the actual value which is either 0,1,2 or 3. Any ideas? I tried with getType().GetProterty().GetValue() tho it doesn't work. I tried in the razor front-end to set as @if (something) {

    @Model.HasValue("variable")

    } as one of the documentation I could find. However, that HasValue or HasProperty etc ain't available. I tried to use "using Umbraco.Web;" nope it doesn't help either. I tried on the back end with custom asp.net mvc to get everything available to membership of umbraco, still no success. Any help will be appreciated.

    https://our.umbraco.com/Documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Label < for the label I've looked into.

    Kind Regards, Val

Please Sign in or register to post replies

Write your reply to:

Draft