I have a view that design view like :

Here i impose some entry validation when click save button I want to display me error message in my expecting display region. How can it possible?
My Controller Action is :
[HttpPost]
public ActionResult Save(COA_ChartsOfAccount oCOA_ChartsOfAccount)
{
try
{
if (this.ValidateInput(oCOA_ChartsOfAccount))
{
COA_ChartsOfAccount oParent = new COA_ChartsOfAccount();
oParent = oParent.Get(oCOA_ChartsOfAccount.ParentHeadID);
if (oCOA_ChartsOfAccount.IsChild)
{
oCOA_ChartsOfAccount.ParentHeadID = oParent.AccountHeadID;
}
else
{
oCOA_ChartsOfAccount.ParentHeadID = oParent.ParentHeadID;
}
oCOA_ChartsOfAccount = oCOA_ChartsOfAccount.Save();
return RedirectToAction("RefreshList");
}
return View(oCOA_ChartsOfAccount);
}
catch (Exception ex)
{
return View(oCOA_ChartsOfAccount);
}
}
Note : I want to make common partial view for error message display. (Like exception error message, validation message, all kind of user notification message)
With your current set up
To display an error message
In your controller:
In your view: