public ActionResult Add(int param1, int param2) { CulcServiceClient client = new CulcServiceClient(); ViewBag.result = client.Add(param1, param2).ToString(); return(View()); }
private void Culc_Click(object sender, EventArgs e) { Int32 param1 = Convert.ToInt32(textbox1.Text); Int32 param2 = Convert.ToInt32(textbox2.Text); CulcServiceClient client = new CulcServiceClient(); Texbox3.Text = client.Add(param1, param2).ToString(); }