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.
I have something like this on the aspx.cs
if (this.exemptcheck == true) {
// could set a variable to pass or whatever is optimal here
}
Then in JS I have a function like this in my .aspx
if (NotANumberCheck(item.GetMember("TotalSpace").Value, 'Space must be Numeric') == false) { return false; }
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.
Thanks