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
246 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

628 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