Example #1
0
        internal static string ListItemToLabel(SelectDetailListItem item, string name)
        {
            var builder = new TagBuilder("label")
            {
                InnerHtml = item.Text
            };

            builder.Attributes["title"] = item.Description;
            return(builder.ToString(TagRenderMode.Normal));
        }
Example #2
0
        internal static string ListItemToCheckBox(SelectDetailListItem item, string name)
        {
            var builder = new TagBuilder("input");

            builder.Attributes["class"]   = "z-index";
            builder.Attributes["type"]    = "checkbox";
            builder.Attributes["name"]    = name;
            builder.Attributes["title"]   = item.Description;
            builder.Attributes["onclick"] = "javascript:changeMSRP(this)";

            if (item.Value != null)
            {
                builder.Attributes["value"] = item.Value;
            }

            return(builder.ToString(TagRenderMode.Normal));
        }
Example #3
0
        internal static string ListItemToCheckBox(SelectDetailListItem item, string name, List <string> existList)
        {
            var builder = new TagBuilder("input");

            builder.Attributes["class"]   = "z-index";
            builder.Attributes["type"]    = "checkbox";
            builder.Attributes["name"]    = name;
            builder.Attributes["title"]   = item.Description;
            builder.Attributes["onclick"] = "javascript:changeMSRP(this)";

            if (existList != null && CheckOptionExist(existList, item.Value.Split('$')[0].Trim()))
            {
                builder.Attributes["checked"] = "checked";
            }


            if (item.Value != null)
            {
                builder.Attributes["value"] = item.Value;
            }

            return(builder.ToString(TagRenderMode.Normal));
        }