I have a custom control that wraps a standart checkbox. But when the "checked" status of the checkbox had been changed I can't get it on the server side.
My code:
public class MNCheckBox : WebControl
{
private CheckBox checkBox;
public MNCheckBox()
{
checkBox = new CheckBox();
}
public bool Checked
{
get
{
return checkBox.Checked;
}
set
{
checkBox.Checked = value;
}
}
protected override void CreateChildControls()
{
this.Controls.Add(checkBox);
}
}
I put the control in mytest.aspx page and check/uncheck the checkbox but on server side the "Checked" proper ...
Go to the complete details ...