private void DutySpotButton_Click(object sender, EventArgs e)
{
Button button = sender as Button;
lblSpotID.Text = button.Name;
string[] strArray = button.Text.Split(new string[1]
{
Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
txtSpotName.Text = strArray[0];
numMaxLimit.Text = (Decimal)int.Parse(strArray[1]);
lblSpotRow.Text =tblDutySpot.GetRow((Control)button).ToString();
lblSpotCol.Text =tblDutySpot.GetColumn((Control)button).ToString();
if (button.BackColor == Color.Red)
{
rbtnOffSpot.Checked = true;
rbtnOnSpot.Checked = false;
}
else
{
rbtnOnSpot.Checked = true;
rbtnOffSpot.Checked = false;
}
}
Line Number 11. numMaxLimit.Text = (Decimal)int.Parse(strArray[1]);
textboxn name = numMaxLimit.Text