You need to create an action with JsonResult in controller which will validate your record. You can call it from Jquery and create popup with your requirement in Jquery. you can modify the following basic example:
C# code
public class YourController : Controller
{
public JsonResult ValidateRecord(clsType objType)
{
Boolean isDuplicate = CheckDup(objType);
return Json(new {result = isDuplicate}, JsonRequestBehavior.AllowGet);
}
}
JavaScript
function ValidateSubmit()
{
$.getJSON('/Your/ValidateRecord', { TypeProp1:TypeValue1 }, function(data) {
var showPopUp=data.result;
if(showPopUp){
//Your popup and form submission code
}
});
}
Please mark as answer if you find it helpful