title: CSHTML. Need to make sure field(s) are entered
body: <p>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.</p>
  
  <p>On the controller I have created a clientside script which is called checkfields:</p>
  
  <pre><code>checkBoxProperties.ClientSideEvents.CheckedChanged = 
      "function (s,e) { checkfields(); }"; 
  </code></pre>
  
  <p>On the CSHTML I have </p>
  
  <pre><code>function checkfields() 
  {
      alert("Value Empty");
      return false;
  
  }
  </code></pre>
  
  <p>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.</p>