Copied to clipboard

Flag this post as spam?

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


  • Sowndar M 50 posts 124 karma points
    May 21, 2019 @ 13:00
    Sowndar M
    0

    Checkbox list not showing the list properly

    I removed the web in my list but still it show the output

    enter image description here

    I tried to show and hide the section base on checkbox list. At First I received the value from back end Web and Mobile. I removed the Web in checkbox list and make it as a desktop. Now received 3(desktop, mobile, web) values instead of 2(Desktop, Mobile) values

     string displyOption = string.Empty;
        if (Model.SliderDisplay != null)
        {
            List<string> list = new List<string>();
            var SliderDisplay = Model.SliderDisplay;
    
    
    
            list.AddRange(Model.SliderDisplay);
            if (list.Count() == 0)
            {
                displyOption = "NoneShowClass";
            }
            else if (list.Count() > 1)
            {
                displyOption = "";
            }
            else
            {
                displyOption = !string.IsNullOrEmpty(list[0]) ? list[0] + "ShowClass" : "";
                if (string.IsNullOrEmpty(displyOption))
                {
                    displyOption = "NoneShowClass";
                }
            }
        }
    
Please Sign in or register to post replies

Write your reply to:

Draft