protected void btnDivide_Click(object sender, EventArgs e) { int numerator = Convert.ToInt32(txtNumerator.Text); int denominator = Convert.ToInt32(txtDenominator.Text); var client = new StudentServiceReference.StudentServiceClient(); try { lblResult.Text = client.GenerateException(numerator, denominator).ToString(); } catch (Exception ex) { Response.Write(ex.Message); } }
protected void Button1_Click(object sender, EventArgs e) { StudentServiceReference.StudentServiceClient obj = new StudentServiceReference.StudentServiceClient(); Response.Write(obj.RegisterForCourse("Computers")); }