title: asp.net jscript Error: Unable to get property 'value' of undefined or null reference
body: <p>Just start learning and having this problem while practicing with jscript</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;script type="text/jscript" language="jscript"&gt;
      function MyClientFunction(sender, arguments) {
          var intValue = arguments.value;
          alert(arguments.value);
          if (intValue % 2 == 0) {
              arguments.IsValue = true;
          }
          else {
              alert("Use Even Numbers");
          }
      }
  &lt;/script&gt;
  
  &lt;asp:textbox ID="TextBox1" runat="server"&gt;&lt;/asp:textbox&gt;
  &lt;asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="CustomValidator" ClientValidationFunction="MyClientFunction();" EnableClientScript="true"&gt;&lt;/asp:CustomValidator&gt;
  &lt;asp:Button ID="Button1" runat="server" Text="Button"&gt;&lt;/asp:Button&gt;
  </code></pre>
  
  <p>showing error after clicking the "button":</p>
  
  <p>"...Error: Unable to get property 'value' of undefined or null reference..."</p>
  
  <p>I'm not sure how the parameters are passed, not really familiar with how the jscript function works</p>
  
  <p>tried this and no errors:</p>
  
  <pre><code>var intValue = document.getElementById("TextBox1").value;
  alert(intValue);
  </code></pre>
  
  <p>Thanks a lot..</p>