I’m just starting to explore asp mvc and jquery.

I have a simple form that has 2 fields, a Date and an Amount.

The behaviour I am trying to achieve is that when the form is submitted, if the record doesn't already exist in my database then add the item. If it does already exist then warn and ask the user for confirmation. If the user proceeds then overwrite the existing record. 

Here is my Mark Up

```
<% using (Html.BeginForm())
       { %>
    <div>
        <%:Html.LabelFor(mod => Model.bal.Date) %>
    </div>
    <div>
        <%: Html.TextBoxFor(mod => Model.bal.Date)%>
        <%:Html.ValidationMessageFor(mod => Model.bal.Date)%>
    </div>
    <div>
        <%: Html.LabelFor(mod => Model.bal.Amount)%>
    </div>
    <div>
        <%: Html.TextBoxFor(mod => Model.bal.Amount)%>
        <%: Html.ValidationMessageFor(mod => Model.bal.Amount)%>
    </div>
    <p>
        <input type="submit" value="Create" />

```

And here is my controller code

```
        [HttpPost]
        public ActionResult Index(Balance bal)
        {

            var dataContext = new DataDataContext();
            if (ModelState.IsValid)
            {
                // Check if exsists
                if (dataContext.Balances.ToList().Contains(bal, new BalanceEquality()))
                {
                    //Exsists, Warn then edit
                    // Add code here to open popup 
                    // if Continue then over write exsisting data in db

                }
                else
                {
                    //Not exsist, insert
                    dataContext.Balances.InsertOnSubmit(bal);
                    dataContext.SubmitChanges();
                }
            }

            compModel myModel = new compModel();
            myModel.bal = bal;
            myModel.allBalances = dataContext.Balances.OrderBy(ball => ball.Date).ToList();
            return View(myModel);
        }

```

The problem I have is how to display and get the results from a Jquery Popup from within my Controller. 

I thought about setting a variable in the ViewData collection, but this didn't seem like "best Practice" to me 

Thanks