What is the code behind property for the @Page element's ValidateRequest

  • Thread starter Thread starter Umut Tezduyar
  • Start date Start date
U

Umut Tezduyar

I couln't find the code begind property on the Page object that
represents the "ValidateRequest" attribute on the @Page element.
There must be some property that the PageParser knows what to do when when
parsing ValidateRequest. I couldn't find any information about this.
Besides, it seems only can be declared on the html, and .config.
What if i am a control author and want to disable ValidateRequest for
some controls. For example, i dont want to be validated, a textbox that i
have added to the page.
 
Hi there

Sounds like you are seeking the CausesValidation property of your control.
Setting it to false should do the trick.

Cheers, Lerp
 
No. CausesValidation is not a method for Control. It is only a method for
some special controls like Button, LinkButton. Also CausesValidation only
validates validators in the page. My problem is a bit different. But thanks
for your reply.
 
From poking around a bit with Reflector, it looks as if there is no
property on the Page class. This might explain why it does not show up
in the properties window for a Page either.

It looks as if the PageCompiler reads the ASPX file and inspects the
setting for ValidateRequest. If it find the value is true, it
automatically injects a call to Request.ValidateInput during the
FrameworkInitialize method of the code gen'ed Page (which I assume
happens before OnInit event).
 

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

Back
Top