I override ParseValidation(object source, ServerValidateEventArgs args) in my custom property to catch a value but it doesn't have no effect, it looks exactly the same as in the property weekday :
public override void ParseValidation(object source, ServerValidateEventArgs args)
{
args.IsValid = false;
int num1 = 0;
CheckBoxList list1 = ((Control) source).Parent as CheckBoxList;
foreach (ListItem item1 in list1.Items)
{
if (item1.Selected)
{
num1 |= int.Parse(item1.Value);
}
}
base.Number = num1;
args.IsValid = true;
}
What did I miss? Thanks!
public override void ParseValidation(object source, ServerValidateEventArgs args) { args.IsValid = false; int num1 = 0; CheckBoxList list1 = ((Control) source).Parent as CheckBoxList; foreach (ListItem item1 in list1.Items) { if (item1.Selected) { num1 |= int.Parse(item1.Value); } } base.Number = num1; args.IsValid = true; }
What did I miss? Thanks!