Pages

Aug 20, 2008

How to write property for CheckBox control in Asp.Net 2.0

Say chActive is the checkBox ,

private string Active
{
get
{
return chkActive.Checked ? "Y" : "N";
}

set
{
chkActive.Checked = (string.Compare(value, "Y", true) == 0 ? true : false);
}
}

Thus a check box property has been written

No comments: