Optimal Way to Pass C# Variables to JS
<p>I have several functions that are written in JS that do error checking on my site.  On one instance I want to disable two of the checks if a certain instance in the DB is true.  </p>

<p>I have something like this on the aspx.cs</p>

<pre><code>if (this.exemptcheck == true) {
  // could set a variable to pass or whatever is optimal here
}
</code></pre>

<p>Then in JS I have a function like this in my .aspx</p>

<pre><code>if (NotANumberCheck(item.GetMember("TotalSpace").Value, 'Space must be Numeric') == false) { return false; }
</code></pre>

<p>I don't want this check to run if this.examptcheck returns true.  What is the optimal way to do this?  I have heard of putting variables in non-visible fields but that doesn't seem ideal.  Any suggestions would be appreciated.</p>

<p>Thanks</p>
