protected void btnDivide_Click(object sender, EventArgs e) { try { lblResult.Text = SimpleFunctions.Divide(Convert.ToInt32(txtFirst.Text), Convert.ToInt32(txtSecond.Text)).ToString(); } catch (DivideByZeroException ex) { lblResult.Text = ex.Message; } }