473,796 Members | 2,570 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ValidateRequest except..

I'm assuming the answer to this is a big "NO", but is it possible to disable validation checks for a particular control, instead of setting ValidateRequest =False in the page directive?

--Michael
Nov 18 '05 #1
4 1415
yeah just disable the validation control associated with that control you do
not want checked.

ValidationContr ol.Enabled = false;

that is if you meant from server side. dont think there is any way to
disable them from clientside... though disabling javascript should do the
job
hope that answers your question,

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
"Raterus" <mo*********@su retar.reverse> wrote in message
news:Oj******** ******@TK2MSFTN GP11.phx.gbl...
I'm assuming the answer to this is a big "NO", but is it possible to disable
validation checks for a particular control, instead of setting
ValidateRequest =False in the page directive?

--Michael
Nov 18 '05 #2
Michael,

I don't think so, since it's a page level directive. What's worse is there's
no way to smartly intercept this error either because it fires before your
code gets control, so even if you capture the exception there's nowhere to
return to...

The thing to do is turn it off on pages where it gets in the way and then
make very sure you validate the input where required.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
http://www.west-wind.com/wwThreads/
----------------------------------
Making waves on the Web
"Raterus" <mo*********@su retar.reverse> wrote in message
news:Oj******** ******@TK2MSFTN GP11.phx.gbl...
I'm assuming the answer to this is a big "NO", but is it possible to disable
validation checks for a particular control, instead of setting
ValidateRequest =False in the page directive?

--Michael
Nov 18 '05 #3
There is a CausesValidatio n property on button controls and such that you
can set to false if you don't want it to trigger validation.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Raterus" <mo*********@su retar.reverse> wrote in message
news:Oj******** ******@TK2MSFTN GP11.phx.gbl...
I'm assuming the answer to this is a big "NO", but is it possible to disable
validation checks for a particular control, instead of setting
ValidateRequest =False in the page directive?

--Michael
Nov 18 '05 #4
Not using the built-in features of ASP.NET. You will have to turn to a third
party solution or write one yourself. I just released "Visual Input
Security" which is an advanced set of tools to detect and block SQL
Injection, script injection, input tampering and brute force attacks. It
includes validators where you can determine just how much is validated on a
control-by-control basis. For example, some will fully block script
injection, others will allow it (knowing that you will also HtmlEncode),
others will block only a list of undesirable HTML tags that you define.
Details are at http://www.peterblum.com/vise/home.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

"Raterus" <mo*********@su retar.reverse> wrote in message
news:Oj******** ******@TK2MSFTN GP11.phx.gbl...
I'm assuming the answer to this is a big "NO", but is it possible to disable
validation checks for a particular control, instead of setting
ValidateRequest =False in the page directive?

--Michael
Nov 18 '05 #5

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

Similar topics

1
20725
by: mar | last post by:
Does anybody know what configuration section should i set to false here. I also tried setting the page directive to false but that didn't fix it. Thanks! mc A potentially dangerous Request.Form value was detected from the client (ResultInput="...="1.0"?> <ResultData xmlns:xs...").
1
3237
by: Shaun Dore | last post by:
Hi, I have a web form containing a TextBox that allows users to edit XML files. When the page is posted, the changes are saved. This worked fine until the ValidateRequest 'feature' came along in .Net 1.1 Now, I've been told that it can be disabled using the 'ValidateRequest' attribute (of Page). This works on 1.1 and is fine since I always encode and check my strings manually to ensure no malicious script can be submitted.
1
1344
by: Benny | last post by:
Hello Experts, If the contents of a text box containing a html tag like formmated characters, i.e. <hello>, and if the validateRequest is set to true, it gives an error when post back: A potentially dangerous Request.Form value was detected from the client. Just wondering what are the drawbacks if the validateRequest is set to true? Under what situations should the validateRequest set to true or false? Thanks,
4
6377
by: Ray Williams | last post by:
I have a specific page that I have chosen to disable the .NET 1.1 validateRequest options by setting the page directive attribute of "validateRequest" from true to false. I manually validate all controls within this page. This page includes a UserControl which contains a textbox. It appears that the validateRequest attribute is not propagated to the usercontrol when the page is processed. This results in the standard "potentially dangerous"...
2
15884
by: Tim Zych | last post by:
I'm trying to stop .Net from validating data entered into a textbox. When I enter < or > .Net returns an error: potentially dangerous Request.Form value was detected from the client... so a search on google indicates a couple of options: 1. Add validateRequest = "false" in the page directive. So I add it: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="addcode.aspx.vb"
8
1868
by: Max Metral | last post by:
Ok, I have a global page class derived from System.Web.UI.Page, let's call it BasePage. I have another class derived from that called MemberPage. It checks the Form collection if it's a post for some "common" fields. Now, I have an aspx page whose code behind derives from BasePage, and which sets ValidateRequest=False in the page directive of the aspx. I can post <script> tags and such with no problems. However, when I make the...
2
2997
by: Andy Fish | last post by:
Hi, I have one textbox on the form that needs to have ValidateRequest disabled, but it seems that it can only be enabled/disabled at a page level. assuming I have to disable it at for the whole page, how can I invoke ValidateRequest functionality for the other text boxes individually? I was looking for some kind of method on I can call that says "validate this control as if ValidateRequest were true" or a function "would this string...
4
2152
by: Dave H | last post by:
If put this into my Web.config. Shouldn't this turn off the ValiateRequest app wide? <configuration> <system.web> <pages buffer="true" validateRequest="false" /> I pass SQL around to pages, and sometimes, this causes the 'Cross Site
2
2067
by: \A_Michigan_User\ | last post by:
*WITHOUT* using: ValidateRequest="False" for the whole page (or my whole site).... How would I trap/detect that a textBox contains some illegal characters? (I'm using asp.net v1.1 and vb.net) Thanks.
0
9684
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...
1
10182
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
10017
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9055
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
6793
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
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
3734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2928
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.