问题:未知的服务器标记“cc:ValidateableCheckBoxList”。
namespace fmwebapp1.UserControls
{
[ValidationPropertyAttribute("ValidateableProperty")]
public class ValidateableCheckBoxList : CheckBoxList
{
public string ValidateableProperty
{
get { return (this.Items.Cast<ListItem>().Where(i => i.Selected).Count() > 0) ? "something was selected" : ""; }
}
}
}
<%@ Register Namespace="fmwebapp1.UserControls" Assembly="ValidateableCheckBoxList" TagPrefix="cc" %>
<cc:ValidateableCheckBoxList runat="server" ID="cblFindTheSite">
<asp:ListItem>The Press</asp:ListItem>
<asp:ListItem>blah1</asp:ListItem>
<asp:ListItem>blah2</asp:ListItem>
</asp:CheckBoxList>
<div class="validators">
<asp:RequiredFieldValidator runat="server" ID="rfvTest" ControlToValidate="cblFindTheSite" Text="Failed validation" ></asp:RequiredFieldValidator>
</div>