Solved

I need to disable all RequiredFieldValidators on my web page but my code does not seem to be working.

Posted on 2004-10-12
5
240 Views
Last Modified: 2010-04-23
               ValQ1.Enabled = False
      ValQ2.Enabled = False
      ValQ3.Enabled = False
      ValQ4.Enabled = False
      ValQ5.Enabled = False
      ValQ6.Enabled = False
      ValQ7.Enabled = False
      ValQ8.Enabled = False
      ValQ9.Enabled = False
      ValQ10.Enabled = False

In some parts of my code this is working and in others it just isn't

Any ideas? I need to completely remove validation if a certain sutuation arises.

Cheers

Paul G
0
Comment
Question by:pgilfeather
  • 2
  • 2
5 Comments
 
LVL 19

Expert Comment

by:arif_eqbal
ID: 12285733
Does it still Validate or just displays the message???

try ValQ10.Visible=False for all validators
0
 

Author Comment

by:pgilfeather
ID: 12285755
Both, it validates and shows the message.

I have tried valQ10.visible =False

I have also tried

ValQ10.EnableClientScript=false

It is the first thing that is being called in the procedure.
0
 
LVL 19

Accepted Solution

by:
arif_eqbal earned 500 total points
ID: 12285848
strange I'll simulate it here and see

0
 
LVL 10

Expert Comment

by:123654789987
ID: 12285924
According to the link below u have to set the ClientTarget attribute in the Page directive to "downlevel" to disable client side script

http://www.codeproject.com/aspnet/groupvalidator.asp
0
 

Author Comment

by:pgilfeather
ID: 12286087
The client Target works but it simply disables all validation all of the time and this is not what I want. I want to be able to control the validation.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now