ASP.net MVC 4.0: Send data from view to controller using @using (Ajax.BeginForm())

Simple Calculator Programme

Controller

calculatorController.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace MvcApplication1.Controllers
{
    public class calculatorController : Controller
    {
             
        public ActionResult cal()
        {
            try
            {
                string op = Request["op"];
                double f = Convert.ToDouble(Request["txt1"]);
                double s = Convert.ToDouble(Request["txt2"]);
                double t=0;
                switch (op)
                {
                    case "+":
                        {
                            t = f + s;
                            break;
                        }
                    case "*":
                        {
                            t = f * s;
                            break;
                        }
                    case "/":
                        {
                            t = f / s;
                            break;
                        }
                }
                ViewBag.total = t.ToString();
            }

            catch (Exception e)
            {
                return Content(e.Message);

            }
               
            return View();   
       }

    }
}


Views

cal.cshtml

<fieldset style="width:400px; margin:auto">
  
    <legend>Calculator</legend>

   
    @using (Ajax.BeginForm("cal", "calculator", new AjaxOptions { UpdateTargetId = "divresult" }))
{
    <table>
        <tr>
            <td>
                @Html.Label("First Number")
            </td>
            <td>
                @Html.TextBox("txt1")
            </td>
        </tr><tr>
                 <td>
                     @Html.Label("Second Number")
                 </td>
                 <td>
                     @Html.TextBox("txt2")
                 </td>
</tr>
    </table>
    <fieldset>
        <legend>Select your operator</legend>
        @Html.RadioButton("op", "+", true)
        @Html.Label("+") |
        @Html.RadioButton("op", "*", true)
        @Html.Label("*") |
        @Html.RadioButton("op", "/", true)
        @Html.Label("/")
        <button>=</button>
    </fieldset>
        
    }
    <h2>Result</h2>
    <div id="divresult">
        @ViewBag.total
    </div>
</fieldset>


Output

1

2