На одной из моих страниц, основанных на ASP.Net и Sitecore CMS, я использую элемент управления CheckBoxList, но почему-то он не выводит метку в HTML.
<asp:CheckBoxList runat="server" ID="chkListBrochure" CssClass="checkbox_single" />
В поле Код файла я загружаю список:
foreach (var item in itemList)
{
var newListItem = new ListItem(item.Title, item.Code);
newListItem.Selected = item.Selected;
chkListBrochure.Items.Add(newListItem);
}
Когда я просматриваю код в браузере, он выглядит как
<div id="body_0_content_0_content_1_chkListBrochure" class="checkbox_single">
<input id="body_0_content_0_content_1_chkListBrochure_0" class="" type="checkbox"
name="body_0$content_0$content_1$chkListBrochure$0">
<input id="body_0_content_0_content_1_chkListBrochure_1" class="" type="checkbox"
checked="checked" name="body_0$content_0$content_1$chkListBrochure$1">
<input id="body_0_content_0_content_1_chkListBrochure_2" class="" type="checkbox"
name="body_0$content_0$content_1$chkListBrochure$2">
<input id="body_0_content_0_content_1_chkListBrochure_3" class="" type="checkbox"
checked="checked" name="body_0$content_0$content_1$chkListBrochure$3">
<input id="body_0_content_0_content_1_chkListBrochure_4" class="" type="checkbox"
name="body_0$content_0$content_1$chkListBrochure$4">
<input id="body_0_content_0_content_1_chkListBrochure_5" class="" type="checkbox"
checked="checked" name="body_0$content_0$content_1$chkListBrochure$5">
</div>
Работает нормально, если я скопирую этот код в не основанный на Sitecore проект. Кто-нибудь сталкивался с этой проблемой? Любое предложение?
Спасибо
Nas