|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do I stop this javascript from being emitted?I have a fairly basic page with some text boxes, validators and submit buttons. I have "EnableClientScript" set to false for all the validators and "enableEventValidation" set to false in the pages section of the web.config file. Whenever a validator is present on the page, the following javascript is emitted: <script type="text/javascript"> <!-- var theForm = document.forms['aspnetForm']; if (!theForm) { theForm = document.aspnetForm; } function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); } } // --> </script> <script src="/WebResource.axd?d=yCWeX6Nxz-J5KFaiENoCPA2&t=632938428474843750" type="text/javascript"></script> If I remove the validators, it's not emitted. I've decoded the viewstate and it contains the following items: -1017253366d __ControlsRequirePostBackKey__ ctl00$cphPage$ctl01 ctl00$cphPage$ctl02R Does anyone know what I can do to stop the javascript being emitted? Thanks, Paul > section of the web.config file. Whenever a validator is present on the Can't help.> page, the following javascript is emitted: It is emitted by the control(s) in .Net... can't be avoided unless you wish to decompile and tweak which I would say, must be avoided and is illegal. -- Happy Hacking, Gaurav Vaish | http://www.mastergaurav.com http://www.edujinionline.com http://articles.edujinionline.com/webservices ------------------- try googling for asp.net adaptive rendering and device filtering
<paul.hes***@gmail.com> wrote in message Show quoteHide quote news:1158275176.638625.46920@h48g2000cwc.googlegroups.com... > Hi all, > > I have a fairly basic page with some text boxes, validators and submit > buttons. I have "EnableClientScript" set to false for all the > validators and "enableEventValidation" set to false in the pages > section of the web.config file. Whenever a validator is present on the > page, the following javascript is emitted: > > <script type="text/javascript"> > <!-- > var theForm = document.forms['aspnetForm']; > if (!theForm) { > theForm = document.aspnetForm; > } > function __doPostBack(eventTarget, eventArgument) { > if (!theForm.onsubmit || (theForm.onsubmit() != false)) { > theForm.__EVENTTARGET.value = eventTarget; > theForm.__EVENTARGUMENT.value = eventArgument; > theForm.submit(); > } > } > // --> > </script> > > <script > src="/WebResource.axd?d=yCWeX6Nxz-J5KFaiENoCPA2&t=632938428474843750" > type="text/javascript"></script> > > If I remove the validators, it's not emitted. I've decoded the > viewstate and it contains the following items: > > -1017253366d > __ControlsRequirePostBackKey__ > ctl00$cphPage$ctl01 > ctl00$cphPage$ctl02R > > Does anyone know what I can do to stop the javascript being emitted? > > Thanks, > > Paul >
How do I return the name (ID) of a user control?
Detailsview - how to reference a field in Java/VB Script ASP.net 2.0 DropdownList bound to SQLDataSource and setting SelectedIndex Smart Navigation asp.net 2.0 menu client script error Calendar control calendar control - weekends word wrap in ultrawebtree word wrap in ultrawebtree word wrap in ultrawebtree How to get the current page control from another class |
|||||||||||||||||||||||