4

I seem to have a bit of a bug, I have a ASP.NET repeater control with a link buttons in it and the link button has the have the causes validation property set to false.

However; when clicking it which makes a panel visible on the web page, the asp.net required field validator controls trigger and shows their error messages. On those controls that I have the validator controls on.

Any ideas as to what might cause it to be ignoring the causes validation property set to false?

3 Answers 3

1

On my opinion, you should set different ValidationGroup properties values for repeater control and for control that is the source for required field validator. It is possible that container for repeat control has raised event that can be heared by required field validator.

If mentioned above cannot help then try to disable client validation for RequiredFieldValidator using EnableClientScript="False" for it. And activate RequiredFieldValidator when it really usefull. For example in the some button event handler you can apply such code:

MyButton.Validate(); if (MyButton.IsValid) { Do what you want... } 
Sign up to request clarification or add additional context in comments.

Comments

1

For anybody that has this problem and stumbles across this post, here's what I found.

Turns out the problem was happening because I had EnableViewState="false" set on the Repeater. This was breaking the event postback somehow, and making every validator on the page fire. All I had to do was manually call DataBind() on the Repeater from within Page_Load(), and it cleared right up.

Comments

0

try to set the visablity of the panel true all the time in design view,, and check the validation again.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.