473,769 Members | 2,078 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to disable client script validation totally from page

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
EnableClientScr ipt="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_ma sterContent_mai nContent_valSha res"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 1"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 2"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 3"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 4"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 5"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valLow1"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valHigh1"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valLow2"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valHigh2"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valLow3"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valHigh3"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valFileUploa d1"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valFileUploa d2"));
// -->
</script>

<script type="text/javascript">
<!--
var ctl00_ctl00_mas terContent_main Content_valShar es = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valSha res"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShares");
ctl00_ctl00_mas terContent_main Content_valShar es.controltoval idate =
"ctl00_ctl00_ma sterContent_mai nContent_txtSha res";
ctl00_ctl00_mas terContent_main Content_valShar es.type = "Double";
ctl00_ctl00_mas terContent_main Content_valShar es.decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valShar es.evaluationfu nction =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valShar es.maximumvalue =
"200000";
ctl00_ctl00_mas terContent_main Content_valShar es.minimumvalue =
"-200000";
var ctl00_ctl00_mas terContent_main Content_valShPe rcent1 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valShP ercent1"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 1");
ctl00_ctl00_mas terContent_main Content_valShPe rcent1.controlt ovalidate =
"ctl00_ctl00_ma sterContent_mai nContent_txtShP ercent1";
ctl00_ctl00_mas terContent_main Content_valShPe rcent1.type = "Double";
ctl00_ctl00_mas terContent_main Content_valShPe rcent1.decimalc har = ".";
ctl00_ctl00_mas terContent_main Content_valShPe rcent1.evaluati onfunction
= "RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valShPe rcent1.maximumv alue =
"999.99";
ctl00_ctl00_mas terContent_main Content_valShPe rcent1.minimumv alue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valShPe rcent2 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valShP ercent2"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 2");
ctl00_ctl00_mas terContent_main Content_valShPe rcent2.controlt ovalidate =
"ctl00_ctl00_ma sterContent_mai nContent_txtShP ercent2";
ctl00_ctl00_mas terContent_main Content_valShPe rcent2.type = "Double";
ctl00_ctl00_mas terContent_main Content_valShPe rcent2.decimalc har = ".";
ctl00_ctl00_mas terContent_main Content_valShPe rcent2.evaluati onfunction
= "RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valShPe rcent2.maximumv alue =
"999.99";
ctl00_ctl00_mas terContent_main Content_valShPe rcent2.minimumv alue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valShPe rcent3 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valShP ercent3"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 3");
ctl00_ctl00_mas terContent_main Content_valShPe rcent3.controlt ovalidate =
"ctl00_ctl00_ma sterContent_mai nContent_txtShP ercent3";
ctl00_ctl00_mas terContent_main Content_valShPe rcent3.type = "Double";
ctl00_ctl00_mas terContent_main Content_valShPe rcent3.decimalc har = ".";
ctl00_ctl00_mas terContent_main Content_valShPe rcent3.evaluati onfunction
= "RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valShPe rcent3.maximumv alue =
"999.99";
ctl00_ctl00_mas terContent_main Content_valShPe rcent3.minimumv alue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valShPe rcent4 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valShP ercent4"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 4");
ctl00_ctl00_mas terContent_main Content_valShPe rcent4.controlt ovalidate =
"ctl00_ctl00_ma sterContent_mai nContent_txtShP ercent4";
ctl00_ctl00_mas terContent_main Content_valShPe rcent4.type = "Double";
ctl00_ctl00_mas terContent_main Content_valShPe rcent4.decimalc har = ".";
ctl00_ctl00_mas terContent_main Content_valShPe rcent4.evaluati onfunction
= "RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valShPe rcent4.maximumv alue =
"999.99";
ctl00_ctl00_mas terContent_main Content_valShPe rcent4.minimumv alue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valShPe rcent5 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valShP ercent5"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 5");
ctl00_ctl00_mas terContent_main Content_valShPe rcent5.controlt ovalidate =
"ctl00_ctl00_ma sterContent_mai nContent_txtShP ercent5";
ctl00_ctl00_mas terContent_main Content_valShPe rcent5.type = "Double";
ctl00_ctl00_mas terContent_main Content_valShPe rcent5.decimalc har = ".";
ctl00_ctl00_mas terContent_main Content_valShPe rcent5.evaluati onfunction
= "RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valShPe rcent5.maximumv alue =
"999.99";
ctl00_ctl00_mas terContent_main Content_valShPe rcent5.minimumv alue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valLow1 = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valLow 1"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valLow1");
ctl00_ctl00_mas terContent_main Content_valLow1 .controltovalid ate =
"ctl00_ctl00_ma sterContent_mai nContent_txtLow 1";
ctl00_ctl00_mas terContent_main Content_valLow1 .type = "Double";
ctl00_ctl00_mas terContent_main Content_valLow1 .decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valLow1 .evaluationfunc tion =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valLow1 .maximumvalue = "999.99";
ctl00_ctl00_mas terContent_main Content_valLow1 .minimumvalue = "-999.99";
var ctl00_ctl00_mas terContent_main Content_valHigh 1 = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valHig h1"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valHigh1");
ctl00_ctl00_mas terContent_main Content_valHigh 1.controltovali date =
"ctl00_ctl00_ma sterContent_mai nContent_txtHig h1";
ctl00_ctl00_mas terContent_main Content_valHigh 1.type = "Double";
ctl00_ctl00_mas terContent_main Content_valHigh 1.decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valHigh 1.evaluationfun ction =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valHigh 1.maximumvalue = "999.99";
ctl00_ctl00_mas terContent_main Content_valHigh 1.minimumvalue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valLow2 = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valLow 2"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valLow2");
ctl00_ctl00_mas terContent_main Content_valLow2 .controltovalid ate =
"ctl00_ctl00_ma sterContent_mai nContent_txtLow 2";
ctl00_ctl00_mas terContent_main Content_valLow2 .type = "Double";
ctl00_ctl00_mas terContent_main Content_valLow2 .decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valLow2 .evaluationfunc tion =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valLow2 .maximumvalue = "999.99";
ctl00_ctl00_mas terContent_main Content_valLow2 .minimumvalue = "-999.99";
var ctl00_ctl00_mas terContent_main Content_valHigh 2 = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valHig h2"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valHigh2");
ctl00_ctl00_mas terContent_main Content_valHigh 2.controltovali date =
"ctl00_ctl00_ma sterContent_mai nContent_txtHig h2";
ctl00_ctl00_mas terContent_main Content_valHigh 2.type = "Double";
ctl00_ctl00_mas terContent_main Content_valHigh 2.decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valHigh 2.evaluationfun ction =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valHigh 2.maximumvalue = "999.99";
ctl00_ctl00_mas terContent_main Content_valHigh 2.minimumvalue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valLow3 = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valLow 3"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valLow3");
ctl00_ctl00_mas terContent_main Content_valLow3 .controltovalid ate =
"ctl00_ctl00_ma sterContent_mai nContent_txtLow 3";
ctl00_ctl00_mas terContent_main Content_valLow3 .type = "Double";
ctl00_ctl00_mas terContent_main Content_valLow3 .decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valLow3 .evaluationfunc tion =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valLow3 .maximumvalue = "999.99";
ctl00_ctl00_mas terContent_main Content_valLow3 .minimumvalue = "-999.99";
var ctl00_ctl00_mas terContent_main Content_valHigh 3 = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valHig h3"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valHigh3");
ctl00_ctl00_mas terContent_main Content_valHigh 3.controltovali date =
"ctl00_ctl00_ma sterContent_mai nContent_txtHig h3";
ctl00_ctl00_mas terContent_main Content_valHigh 3.type = "Double";
ctl00_ctl00_mas terContent_main Content_valHigh 3.decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valHigh 3.evaluationfun ction =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valHigh 3.maximumvalue = "999.99";
ctl00_ctl00_mas terContent_main Content_valHigh 3.minimumvalue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valFile Upload1 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valFil eUpload1"]
:
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valFileUploa d1");
ctl00_ctl00_mas terContent_main Content_valFile Upload1.control tovalidate
= "ctl00_ctl00_ma sterContent_mai nContent_FileUp load1";
ctl00_ctl00_mas terContent_main Content_valFile Upload1.evaluat ionfunction
= "RegularExpress ionValidatorEva luateIsValid";
ctl00_ctl00_mas terContent_main Content_valFile Upload1.validat ionexpression
=
".*\\.(?:(?:(?: 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_mas terContent_main Content_valFile Upload2 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valFil eUpload2"]
:
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valFileUploa d2");
ctl00_ctl00_mas terContent_main Content_valFile Upload2.control tovalidate
= "ctl00_ctl00_ma sterContent_mai nContent_FileUp load2";
ctl00_ctl00_mas terContent_main Content_valFile Upload2.evaluat ionfunction
= "RegularExpress ionValidatorEva luateIsValid";
ctl00_ctl00_mas terContent_main Content_valFile Upload2.validat ionexpression
=
".*\\.(?:(?:(?: 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

Feb 8 '06 #1
2 1949
The EnableClientScr ipt property should entirely remove the javascript for a
validator that you see in both script sections you posted.

So either your EnableClientScr ipt=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 RequiredFieldVa lidator. Evaluate the
HTML output when EnableClientScr ipt=false to see if you get the same
problem. If so, you can report a bug to Microsoft here:
http://lab.msdn.microsoft.com/Produc...k/default.aspx

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"ibiza" <la******@gmail .com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
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
EnableClientScr ipt="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_ma sterContent_mai nContent_valSha res"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 1"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 2"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 3"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 4"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 5"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valLow1"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valHigh1"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valLow2"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valHigh2"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valLow3"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valHigh3"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valFileUploa d1"),
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valFileUploa d2"));
// -->
</script>

<script type="text/javascript">
<!--
var ctl00_ctl00_mas terContent_main Content_valShar es = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valSha res"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShares");
ctl00_ctl00_mas terContent_main Content_valShar es.controltoval idate =
"ctl00_ctl00_ma sterContent_mai nContent_txtSha res";
ctl00_ctl00_mas terContent_main Content_valShar es.type = "Double";
ctl00_ctl00_mas terContent_main Content_valShar es.decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valShar es.evaluationfu nction =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valShar es.maximumvalue =
"200000";
ctl00_ctl00_mas terContent_main Content_valShar es.minimumvalue =
"-200000";
var ctl00_ctl00_mas terContent_main Content_valShPe rcent1 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valShP ercent1"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 1");
ctl00_ctl00_mas terContent_main Content_valShPe rcent1.controlt ovalidate =
"ctl00_ctl00_ma sterContent_mai nContent_txtShP ercent1";
ctl00_ctl00_mas terContent_main Content_valShPe rcent1.type = "Double";
ctl00_ctl00_mas terContent_main Content_valShPe rcent1.decimalc har = ".";
ctl00_ctl00_mas terContent_main Content_valShPe rcent1.evaluati onfunction
= "RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valShPe rcent1.maximumv alue =
"999.99";
ctl00_ctl00_mas terContent_main Content_valShPe rcent1.minimumv alue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valShPe rcent2 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valShP ercent2"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 2");
ctl00_ctl00_mas terContent_main Content_valShPe rcent2.controlt ovalidate =
"ctl00_ctl00_ma sterContent_mai nContent_txtShP ercent2";
ctl00_ctl00_mas terContent_main Content_valShPe rcent2.type = "Double";
ctl00_ctl00_mas terContent_main Content_valShPe rcent2.decimalc har = ".";
ctl00_ctl00_mas terContent_main Content_valShPe rcent2.evaluati onfunction
= "RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valShPe rcent2.maximumv alue =
"999.99";
ctl00_ctl00_mas terContent_main Content_valShPe rcent2.minimumv alue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valShPe rcent3 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valShP ercent3"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 3");
ctl00_ctl00_mas terContent_main Content_valShPe rcent3.controlt ovalidate =
"ctl00_ctl00_ma sterContent_mai nContent_txtShP ercent3";
ctl00_ctl00_mas terContent_main Content_valShPe rcent3.type = "Double";
ctl00_ctl00_mas terContent_main Content_valShPe rcent3.decimalc har = ".";
ctl00_ctl00_mas terContent_main Content_valShPe rcent3.evaluati onfunction
= "RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valShPe rcent3.maximumv alue =
"999.99";
ctl00_ctl00_mas terContent_main Content_valShPe rcent3.minimumv alue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valShPe rcent4 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valShP ercent4"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 4");
ctl00_ctl00_mas terContent_main Content_valShPe rcent4.controlt ovalidate =
"ctl00_ctl00_ma sterContent_mai nContent_txtShP ercent4";
ctl00_ctl00_mas terContent_main Content_valShPe rcent4.type = "Double";
ctl00_ctl00_mas terContent_main Content_valShPe rcent4.decimalc har = ".";
ctl00_ctl00_mas terContent_main Content_valShPe rcent4.evaluati onfunction
= "RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valShPe rcent4.maximumv alue =
"999.99";
ctl00_ctl00_mas terContent_main Content_valShPe rcent4.minimumv alue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valShPe rcent5 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valShP ercent5"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valShPercent 5");
ctl00_ctl00_mas terContent_main Content_valShPe rcent5.controlt ovalidate =
"ctl00_ctl00_ma sterContent_mai nContent_txtShP ercent5";
ctl00_ctl00_mas terContent_main Content_valShPe rcent5.type = "Double";
ctl00_ctl00_mas terContent_main Content_valShPe rcent5.decimalc har = ".";
ctl00_ctl00_mas terContent_main Content_valShPe rcent5.evaluati onfunction
= "RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valShPe rcent5.maximumv alue =
"999.99";
ctl00_ctl00_mas terContent_main Content_valShPe rcent5.minimumv alue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valLow1 = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valLow 1"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valLow1");
ctl00_ctl00_mas terContent_main Content_valLow1 .controltovalid ate =
"ctl00_ctl00_ma sterContent_mai nContent_txtLow 1";
ctl00_ctl00_mas terContent_main Content_valLow1 .type = "Double";
ctl00_ctl00_mas terContent_main Content_valLow1 .decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valLow1 .evaluationfunc tion =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valLow1 .maximumvalue = "999.99";
ctl00_ctl00_mas terContent_main Content_valLow1 .minimumvalue = "-999.99";
var ctl00_ctl00_mas terContent_main Content_valHigh 1 = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valHig h1"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valHigh1");
ctl00_ctl00_mas terContent_main Content_valHigh 1.controltovali date =
"ctl00_ctl00_ma sterContent_mai nContent_txtHig h1";
ctl00_ctl00_mas terContent_main Content_valHigh 1.type = "Double";
ctl00_ctl00_mas terContent_main Content_valHigh 1.decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valHigh 1.evaluationfun ction =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valHigh 1.maximumvalue = "999.99";
ctl00_ctl00_mas terContent_main Content_valHigh 1.minimumvalue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valLow2 = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valLow 2"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valLow2");
ctl00_ctl00_mas terContent_main Content_valLow2 .controltovalid ate =
"ctl00_ctl00_ma sterContent_mai nContent_txtLow 2";
ctl00_ctl00_mas terContent_main Content_valLow2 .type = "Double";
ctl00_ctl00_mas terContent_main Content_valLow2 .decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valLow2 .evaluationfunc tion =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valLow2 .maximumvalue = "999.99";
ctl00_ctl00_mas terContent_main Content_valLow2 .minimumvalue = "-999.99";
var ctl00_ctl00_mas terContent_main Content_valHigh 2 = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valHig h2"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valHigh2");
ctl00_ctl00_mas terContent_main Content_valHigh 2.controltovali date =
"ctl00_ctl00_ma sterContent_mai nContent_txtHig h2";
ctl00_ctl00_mas terContent_main Content_valHigh 2.type = "Double";
ctl00_ctl00_mas terContent_main Content_valHigh 2.decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valHigh 2.evaluationfun ction =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valHigh 2.maximumvalue = "999.99";
ctl00_ctl00_mas terContent_main Content_valHigh 2.minimumvalue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valLow3 = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valLow 3"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valLow3");
ctl00_ctl00_mas terContent_main Content_valLow3 .controltovalid ate =
"ctl00_ctl00_ma sterContent_mai nContent_txtLow 3";
ctl00_ctl00_mas terContent_main Content_valLow3 .type = "Double";
ctl00_ctl00_mas terContent_main Content_valLow3 .decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valLow3 .evaluationfunc tion =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valLow3 .maximumvalue = "999.99";
ctl00_ctl00_mas terContent_main Content_valLow3 .minimumvalue = "-999.99";
var ctl00_ctl00_mas terContent_main Content_valHigh 3 = document.all ?
document.all["ctl00_ctl00_ma sterContent_mai nContent_valHig h3"] :
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valHigh3");
ctl00_ctl00_mas terContent_main Content_valHigh 3.controltovali date =
"ctl00_ctl00_ma sterContent_mai nContent_txtHig h3";
ctl00_ctl00_mas terContent_main Content_valHigh 3.type = "Double";
ctl00_ctl00_mas terContent_main Content_valHigh 3.decimalchar = ".";
ctl00_ctl00_mas terContent_main Content_valHigh 3.evaluationfun ction =
"RangeValidator EvaluateIsValid ";
ctl00_ctl00_mas terContent_main Content_valHigh 3.maximumvalue = "999.99";
ctl00_ctl00_mas terContent_main Content_valHigh 3.minimumvalue =
"-999.99";
var ctl00_ctl00_mas terContent_main Content_valFile Upload1 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valFil eUpload1"]
:
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valFileUploa d1");
ctl00_ctl00_mas terContent_main Content_valFile Upload1.control tovalidate
= "ctl00_ctl00_ma sterContent_mai nContent_FileUp load1";
ctl00_ctl00_mas terContent_main Content_valFile Upload1.evaluat ionfunction
= "RegularExpress ionValidatorEva luateIsValid";
ctl00_ctl00_mas terContent_main Content_valFile Upload1.validat ionexpression
=
".*\\.(?:(?:(?: 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_mas terContent_main Content_valFile Upload2 = document.all
? document.all["ctl00_ctl00_ma sterContent_mai nContent_valFil eUpload2"]
:
document.getEle mentById("ctl00 _ctl00_masterCo ntent_mainConte nt_valFileUploa d2");
ctl00_ctl00_mas terContent_main Content_valFile Upload2.control tovalidate
= "ctl00_ctl00_ma sterContent_mai nContent_FileUp load2";
ctl00_ctl00_mas terContent_main Content_valFile Upload2.evaluat ionfunction
= "RegularExpress ionValidatorEva luateIsValid";
ctl00_ctl00_mas terContent_main Content_valFile Upload2.validat ionexpression
=
".*\\.(?:(?:(?: 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

Feb 8 '06 #2
okay, this one was my fault o_O
the controls still rendered did not have the EnableClientScr ipt=false

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

Feb 8 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2629
by: Tim Meagher | last post by:
I am trying to use both validation controls and to add submit button attributes, but when I add the button attributes, the javascript fpr the validation controls is no longer created for the page. How can I use both? Thank you, Tim Meagher
2
13274
by: techfuzz | last post by:
I scoured this group and others looking for the best way to disable a button after the first click to prevent multiple submissions, but never did find anything that worked like they said it would. I went ahead and wrote my own bit of code so I'm sharing it here for everyone. Even though it doesn't really disable the button by greying it out, it prevents the multiple submissions which it what I was attempting to prevent all along. ...
2
3900
by: Mike Nooney | last post by:
How do I disable the "X" in the upper right hand corner of my Web Page. This is not for a windows form, but rather a web application. What I really need is to stop the user from unloading the page, if certain data is not present on the page. I know I should not use the Page_Unload event for this. I wouild like to disable the Close Button, or putting some extra validation behind a certain event, which event I am not sure. Any help would...
2
2685
by: Dnna | last post by:
I have a table which is bound to an Internet Explorer XML data island. I'm using ASP.NET's client-side validators for an input field in the table. The problem is that if the input fields are in a table that is bound to the island (such that the rows are dynamically generated by IE from the XML data island), the validators do not work. If the table is not bound, the validators do work, but then I don't have the table iterating through...
3
13140
by: Earl Teigrob | last post by:
I wanted my "Terms and Conditions" Checkbox control to participate in my ASP.NET validation just like all the the other controls on the page. After some time of searching the web for an example of how to do this, I created the script to do it and thought I would share it. Its a littel messy but does the job. If anyone has a better solution, please let me know. //Client Site Event Handler to put in Page_Load event...
1
1059
by: Darrel | last post by:
I am creating a server control that inherits from a command button. The problem is it needs to generate different client side script, depending on whether validators will get added to the page or not. On the server side, is there some way I can check to see if the asp.net page will be sending to the client the validation client side script or not. Currenly I have to loop through every control on the page to see if any of them is a...
2
5929
by: Fluxray | last post by:
--Background: I have a webform including a datagrid. The datagrid is using template. Its ItemTemplate is used to display a look-up-table with labels. its EditItemTemplate is used to edit a row in the look-up-table with textboxes. I have a linkbutton in each row (causevalidation = false) named 'Edit' to post the page back such that the page is switch from display mode to edit mode (labels -> textboxes for the row to be edited), and the...
7
1968
by: Jo Inferis | last post by:
For reasons that are unlikely to become clear at the moment, I have a page with some validation controls on it which opens a dialog. The dialog does *stuff* and then closes with a call to : parent.document.forms.submit(); Unfortunately, this fires off all the validation controls on the page, and I'd rather it didn't. Any ideas how I can submit the form programmatically without firing the
4
2736
by: kschneider | last post by:
Assume there's a form with it's action attribute all set to post to a URL, but without a submit control. Form submission is done via a link and I want to prevent the classic "double submit". Ignoring the server side of things, does anyone see any holes with the following script? It seems to work, but I'd appreciate other eyes on it. Maybe a try/catch/finally wrapper of some sort to be sure the link is re-enabled in the face of an...
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9422
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10208
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8867
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5294
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3952
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3558
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2812
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.