How to disable client script validation totally from page

I

ibiza

Hi all,

I have a quite big webform that has about ~15 validators. I found,
after having looked at the generated HTML source, that the filesize is
pretty big : about 65KB. Then, I added to every validator the property
EnableClientScript="False", because I already have my neat client
validation scripts. That cut off the size of the generated source to
~45KB.

However, even if there is no asp.net client script supposed to validate
my inputs, I still have this nasty portion of javascript code in the
webform source :

<script type="text/javascript">
<!--
var Page_Validators = new
Array(document.getElementById("ctl00_ctl00_masterContent_mainContent_valShares"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent1"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent2"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent3"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent4"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent5"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valLow1"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valHigh1"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valLow2"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valHigh2"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valLow3"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valHigh3"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valFileUpload1"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valFileUpload2"));
// -->
</script>

<script type="text/javascript">
<!--
var ctl00_ctl00_masterContent_mainContent_valShares = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valShares"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShares");
ctl00_ctl00_masterContent_mainContent_valShares.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtShares";
ctl00_ctl00_masterContent_mainContent_valShares.type = "Double";
ctl00_ctl00_masterContent_mainContent_valShares.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valShares.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valShares.maximumvalue =
"200000";
ctl00_ctl00_masterContent_mainContent_valShares.minimumvalue =
"-200000";
var ctl00_ctl00_masterContent_mainContent_valShPercent1 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valShPercent1"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent1");
ctl00_ctl00_masterContent_mainContent_valShPercent1.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtShPercent1";
ctl00_ctl00_masterContent_mainContent_valShPercent1.type = "Double";
ctl00_ctl00_masterContent_mainContent_valShPercent1.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valShPercent1.evaluationfunction
= "RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valShPercent1.maximumvalue =
"999.99";
ctl00_ctl00_masterContent_mainContent_valShPercent1.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valShPercent2 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valShPercent2"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent2");
ctl00_ctl00_masterContent_mainContent_valShPercent2.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtShPercent2";
ctl00_ctl00_masterContent_mainContent_valShPercent2.type = "Double";
ctl00_ctl00_masterContent_mainContent_valShPercent2.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valShPercent2.evaluationfunction
= "RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valShPercent2.maximumvalue =
"999.99";
ctl00_ctl00_masterContent_mainContent_valShPercent2.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valShPercent3 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valShPercent3"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent3");
ctl00_ctl00_masterContent_mainContent_valShPercent3.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtShPercent3";
ctl00_ctl00_masterContent_mainContent_valShPercent3.type = "Double";
ctl00_ctl00_masterContent_mainContent_valShPercent3.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valShPercent3.evaluationfunction
= "RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valShPercent3.maximumvalue =
"999.99";
ctl00_ctl00_masterContent_mainContent_valShPercent3.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valShPercent4 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valShPercent4"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent4");
ctl00_ctl00_masterContent_mainContent_valShPercent4.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtShPercent4";
ctl00_ctl00_masterContent_mainContent_valShPercent4.type = "Double";
ctl00_ctl00_masterContent_mainContent_valShPercent4.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valShPercent4.evaluationfunction
= "RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valShPercent4.maximumvalue =
"999.99";
ctl00_ctl00_masterContent_mainContent_valShPercent4.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valShPercent5 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valShPercent5"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent5");
ctl00_ctl00_masterContent_mainContent_valShPercent5.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtShPercent5";
ctl00_ctl00_masterContent_mainContent_valShPercent5.type = "Double";
ctl00_ctl00_masterContent_mainContent_valShPercent5.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valShPercent5.evaluationfunction
= "RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valShPercent5.maximumvalue =
"999.99";
ctl00_ctl00_masterContent_mainContent_valShPercent5.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valLow1 = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valLow1"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valLow1");
ctl00_ctl00_masterContent_mainContent_valLow1.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtLow1";
ctl00_ctl00_masterContent_mainContent_valLow1.type = "Double";
ctl00_ctl00_masterContent_mainContent_valLow1.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valLow1.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valLow1.maximumvalue = "999.99";
ctl00_ctl00_masterContent_mainContent_valLow1.minimumvalue = "-999.99";
var ctl00_ctl00_masterContent_mainContent_valHigh1 = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valHigh1"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valHigh1");
ctl00_ctl00_masterContent_mainContent_valHigh1.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtHigh1";
ctl00_ctl00_masterContent_mainContent_valHigh1.type = "Double";
ctl00_ctl00_masterContent_mainContent_valHigh1.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valHigh1.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valHigh1.maximumvalue = "999.99";
ctl00_ctl00_masterContent_mainContent_valHigh1.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valLow2 = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valLow2"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valLow2");
ctl00_ctl00_masterContent_mainContent_valLow2.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtLow2";
ctl00_ctl00_masterContent_mainContent_valLow2.type = "Double";
ctl00_ctl00_masterContent_mainContent_valLow2.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valLow2.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valLow2.maximumvalue = "999.99";
ctl00_ctl00_masterContent_mainContent_valLow2.minimumvalue = "-999.99";
var ctl00_ctl00_masterContent_mainContent_valHigh2 = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valHigh2"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valHigh2");
ctl00_ctl00_masterContent_mainContent_valHigh2.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtHigh2";
ctl00_ctl00_masterContent_mainContent_valHigh2.type = "Double";
ctl00_ctl00_masterContent_mainContent_valHigh2.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valHigh2.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valHigh2.maximumvalue = "999.99";
ctl00_ctl00_masterContent_mainContent_valHigh2.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valLow3 = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valLow3"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valLow3");
ctl00_ctl00_masterContent_mainContent_valLow3.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtLow3";
ctl00_ctl00_masterContent_mainContent_valLow3.type = "Double";
ctl00_ctl00_masterContent_mainContent_valLow3.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valLow3.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valLow3.maximumvalue = "999.99";
ctl00_ctl00_masterContent_mainContent_valLow3.minimumvalue = "-999.99";
var ctl00_ctl00_masterContent_mainContent_valHigh3 = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valHigh3"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valHigh3");
ctl00_ctl00_masterContent_mainContent_valHigh3.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtHigh3";
ctl00_ctl00_masterContent_mainContent_valHigh3.type = "Double";
ctl00_ctl00_masterContent_mainContent_valHigh3.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valHigh3.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valHigh3.maximumvalue = "999.99";
ctl00_ctl00_masterContent_mainContent_valHigh3.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valFileUpload1 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valFileUpload1"]
:
document.getElementById("ctl00_ctl00_masterContent_mainContent_valFileUpload1");
ctl00_ctl00_masterContent_mainContent_valFileUpload1.controltovalidate
= "ctl00_ctl00_masterContent_mainContent_FileUpload1";
ctl00_ctl00_masterContent_mainContent_valFileUpload1.evaluationfunction
= "RegularExpressionValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valFileUpload1.validationexpression
=
".*\\.(?:(?:(?:b|B)(?:m|M)(?:p|P))|(?:(?:g|G)(?:i|I)(?:f|F))|(?:(?:j|J)(?:p|P)(?:g|G))|(?:(?:p|P)(?:n|N)(?:g|G)))";
var ctl00_ctl00_masterContent_mainContent_valFileUpload2 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valFileUpload2"]
:
document.getElementById("ctl00_ctl00_masterContent_mainContent_valFileUpload2");
ctl00_ctl00_masterContent_mainContent_valFileUpload2.controltovalidate
= "ctl00_ctl00_masterContent_mainContent_FileUpload2";
ctl00_ctl00_masterContent_mainContent_valFileUpload2.evaluationfunction
= "RegularExpressionValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valFileUpload2.validationexpression
=
".*\\.(?:(?:(?:b|B)(?:m|M)(?:p|P))|(?:(?:g|G)(?:i|I)(?:f|F))|(?:(?:j|J)(?:p|P)(?:g|G))|(?:(?:p|P)(?:n|N)(?:g|G)))";
// -->
</script>

whew...this still is about 12KB of useless javascript I guess, as I
disabled every client script from my validators.

My question is : how the *!!!* can I get rid of this portion of code? I
do not want to use *any* asp.net client side script for validation. I
only want it to validate server-side...is this possible??

Thanks a lot!

ibiza
 
P

Peter Blum

The EnableClientScript property should entirely remove the javascript for a
validator that you see in both script sections you posted.

So either your EnableClientScript=false is not working or there is a bug in
VS2005 that ignores some aspect of that property. I encourage you to create
a new web form with just a textbox and RequiredFieldValidator. Evaluate the
HTML output when EnableClientScript=false to see if you get the same
problem. If so, you can report a bug to Microsoft here:
http://lab.msdn.microsoft.com/ProductFeedback/default.aspx

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

ibiza said:
Hi all,

I have a quite big webform that has about ~15 validators. I found,
after having looked at the generated HTML source, that the filesize is
pretty big : about 65KB. Then, I added to every validator the property
EnableClientScript="False", because I already have my neat client
validation scripts. That cut off the size of the generated source to
~45KB.

However, even if there is no asp.net client script supposed to validate
my inputs, I still have this nasty portion of javascript code in the
webform source :

<script type="text/javascript">
<!--
var Page_Validators = new
Array(document.getElementById("ctl00_ctl00_masterContent_mainContent_valShares"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent1"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent2"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent3"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent4"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent5"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valLow1"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valHigh1"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valLow2"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valHigh2"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valLow3"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valHigh3"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valFileUpload1"),
document.getElementById("ctl00_ctl00_masterContent_mainContent_valFileUpload2"));
// -->
</script>

<script type="text/javascript">
<!--
var ctl00_ctl00_masterContent_mainContent_valShares = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valShares"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShares");
ctl00_ctl00_masterContent_mainContent_valShares.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtShares";
ctl00_ctl00_masterContent_mainContent_valShares.type = "Double";
ctl00_ctl00_masterContent_mainContent_valShares.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valShares.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valShares.maximumvalue =
"200000";
ctl00_ctl00_masterContent_mainContent_valShares.minimumvalue =
"-200000";
var ctl00_ctl00_masterContent_mainContent_valShPercent1 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valShPercent1"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent1");
ctl00_ctl00_masterContent_mainContent_valShPercent1.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtShPercent1";
ctl00_ctl00_masterContent_mainContent_valShPercent1.type = "Double";
ctl00_ctl00_masterContent_mainContent_valShPercent1.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valShPercent1.evaluationfunction
= "RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valShPercent1.maximumvalue =
"999.99";
ctl00_ctl00_masterContent_mainContent_valShPercent1.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valShPercent2 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valShPercent2"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent2");
ctl00_ctl00_masterContent_mainContent_valShPercent2.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtShPercent2";
ctl00_ctl00_masterContent_mainContent_valShPercent2.type = "Double";
ctl00_ctl00_masterContent_mainContent_valShPercent2.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valShPercent2.evaluationfunction
= "RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valShPercent2.maximumvalue =
"999.99";
ctl00_ctl00_masterContent_mainContent_valShPercent2.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valShPercent3 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valShPercent3"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent3");
ctl00_ctl00_masterContent_mainContent_valShPercent3.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtShPercent3";
ctl00_ctl00_masterContent_mainContent_valShPercent3.type = "Double";
ctl00_ctl00_masterContent_mainContent_valShPercent3.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valShPercent3.evaluationfunction
= "RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valShPercent3.maximumvalue =
"999.99";
ctl00_ctl00_masterContent_mainContent_valShPercent3.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valShPercent4 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valShPercent4"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent4");
ctl00_ctl00_masterContent_mainContent_valShPercent4.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtShPercent4";
ctl00_ctl00_masterContent_mainContent_valShPercent4.type = "Double";
ctl00_ctl00_masterContent_mainContent_valShPercent4.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valShPercent4.evaluationfunction
= "RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valShPercent4.maximumvalue =
"999.99";
ctl00_ctl00_masterContent_mainContent_valShPercent4.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valShPercent5 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valShPercent5"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valShPercent5");
ctl00_ctl00_masterContent_mainContent_valShPercent5.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtShPercent5";
ctl00_ctl00_masterContent_mainContent_valShPercent5.type = "Double";
ctl00_ctl00_masterContent_mainContent_valShPercent5.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valShPercent5.evaluationfunction
= "RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valShPercent5.maximumvalue =
"999.99";
ctl00_ctl00_masterContent_mainContent_valShPercent5.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valLow1 = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valLow1"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valLow1");
ctl00_ctl00_masterContent_mainContent_valLow1.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtLow1";
ctl00_ctl00_masterContent_mainContent_valLow1.type = "Double";
ctl00_ctl00_masterContent_mainContent_valLow1.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valLow1.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valLow1.maximumvalue = "999.99";
ctl00_ctl00_masterContent_mainContent_valLow1.minimumvalue = "-999.99";
var ctl00_ctl00_masterContent_mainContent_valHigh1 = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valHigh1"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valHigh1");
ctl00_ctl00_masterContent_mainContent_valHigh1.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtHigh1";
ctl00_ctl00_masterContent_mainContent_valHigh1.type = "Double";
ctl00_ctl00_masterContent_mainContent_valHigh1.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valHigh1.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valHigh1.maximumvalue = "999.99";
ctl00_ctl00_masterContent_mainContent_valHigh1.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valLow2 = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valLow2"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valLow2");
ctl00_ctl00_masterContent_mainContent_valLow2.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtLow2";
ctl00_ctl00_masterContent_mainContent_valLow2.type = "Double";
ctl00_ctl00_masterContent_mainContent_valLow2.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valLow2.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valLow2.maximumvalue = "999.99";
ctl00_ctl00_masterContent_mainContent_valLow2.minimumvalue = "-999.99";
var ctl00_ctl00_masterContent_mainContent_valHigh2 = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valHigh2"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valHigh2");
ctl00_ctl00_masterContent_mainContent_valHigh2.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtHigh2";
ctl00_ctl00_masterContent_mainContent_valHigh2.type = "Double";
ctl00_ctl00_masterContent_mainContent_valHigh2.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valHigh2.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valHigh2.maximumvalue = "999.99";
ctl00_ctl00_masterContent_mainContent_valHigh2.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valLow3 = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valLow3"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valLow3");
ctl00_ctl00_masterContent_mainContent_valLow3.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtLow3";
ctl00_ctl00_masterContent_mainContent_valLow3.type = "Double";
ctl00_ctl00_masterContent_mainContent_valLow3.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valLow3.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valLow3.maximumvalue = "999.99";
ctl00_ctl00_masterContent_mainContent_valLow3.minimumvalue = "-999.99";
var ctl00_ctl00_masterContent_mainContent_valHigh3 = document.all ?
document.all["ctl00_ctl00_masterContent_mainContent_valHigh3"] :
document.getElementById("ctl00_ctl00_masterContent_mainContent_valHigh3");
ctl00_ctl00_masterContent_mainContent_valHigh3.controltovalidate =
"ctl00_ctl00_masterContent_mainContent_txtHigh3";
ctl00_ctl00_masterContent_mainContent_valHigh3.type = "Double";
ctl00_ctl00_masterContent_mainContent_valHigh3.decimalchar = ".";
ctl00_ctl00_masterContent_mainContent_valHigh3.evaluationfunction =
"RangeValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valHigh3.maximumvalue = "999.99";
ctl00_ctl00_masterContent_mainContent_valHigh3.minimumvalue =
"-999.99";
var ctl00_ctl00_masterContent_mainContent_valFileUpload1 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valFileUpload1"]
:
document.getElementById("ctl00_ctl00_masterContent_mainContent_valFileUpload1");
ctl00_ctl00_masterContent_mainContent_valFileUpload1.controltovalidate
= "ctl00_ctl00_masterContent_mainContent_FileUpload1";
ctl00_ctl00_masterContent_mainContent_valFileUpload1.evaluationfunction
= "RegularExpressionValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valFileUpload1.validationexpression
=
".*\\.(?:(?:(?:b|B)(?:m|M)(?:p|P))|(?:(?:g|G)(?:i|I)(?:f|F))|(?:(?:j|J)(?:p|P)(?:g|G))|(?:(?:p|P)(?:n|N)(?:g|G)))";
var ctl00_ctl00_masterContent_mainContent_valFileUpload2 = document.all
? document.all["ctl00_ctl00_masterContent_mainContent_valFileUpload2"]
:
document.getElementById("ctl00_ctl00_masterContent_mainContent_valFileUpload2");
ctl00_ctl00_masterContent_mainContent_valFileUpload2.controltovalidate
= "ctl00_ctl00_masterContent_mainContent_FileUpload2";
ctl00_ctl00_masterContent_mainContent_valFileUpload2.evaluationfunction
= "RegularExpressionValidatorEvaluateIsValid";
ctl00_ctl00_masterContent_mainContent_valFileUpload2.validationexpression
=
".*\\.(?:(?:(?:b|B)(?:m|M)(?:p|P))|(?:(?:g|G)(?:i|I)(?:f|F))|(?:(?:j|J)(?:p|P)(?:g|G))|(?:(?:p|P)(?:n|N)(?:g|G)))";
// -->
</script>

whew...this still is about 12KB of useless javascript I guess, as I
disabled every client script from my validators.

My question is : how the *!!!* can I get rid of this portion of code? I
do not want to use *any* asp.net client side script for validation. I
only want it to validate server-side...is this possible??

Thanks a lot!

ibiza
 
I

ibiza

okay, this one was my fault o_O
the controls still rendered did not have the EnableClientScript=false

Thanks for your comment, it made me recheck my code :p
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top