The application is a Web MVC application in C#. When the user is editing a record and clicks on a checkbox I want to make sure 3 fields are filled in.
On the controller I have created a clientside script which is called checkfields:
checkBoxProperties.ClientSideEvents.CheckedChanged =
"function (s,e) { checkfields(); }";
On the CSHTML I have
function checkfields()
{
alert("Value Empty");
return false;
}
When I check the checkbox I am getting the alert pop up but how do I reference the model fields and popup alert if one of the fields are empty.