You are correct in what you are saying but this is not the problem!
If you have a form split into two parts - lets say contact details on the
first panel and then the enquiry details on the second panel.
Initially the first panel is set to visible = True and then the second panel
to visible = False. When you click the Next button the validation controls
should validate the controls on the first panel before running the click
event on the button i.e. it should stop the click event turning off the
first panel and then turning on the second panel.
This works perfectly on my workstation but if I copy the code onto the
server the validation controls just don't work and the click event still
fires changing the visibility on the forms. However if I disable the
visibility on the first panel i.e. instead of turning one off and one on, I
just turn the second one on then the error messages can be seen on the first
panel.
I therefore conclude that the error messages on the validator controls are
working but the validation control is failing to stop the click event from
following through.
I hope this explains it better!
"Fernando Hunth" <Fe***********@discussions.microsoft.com> wrote in message
news:8F**********************************@microsof t.com...
Martyn:
I think that it is not a 2003 Problem.
It is true that .Net generates javascript for validations, but if you have
these controls at a container that you set it to Invisible, these controls
never are rendered and sent to client, because when you set the visibility
property on a control, it is never rendered.
Another cause of some validation control does not work is that you have a
script error, that causes that the javascript that is generated by .Net ,
does not run.
Hope this helps.
"Martyn Fewtrell" wrote:
Dear All
I have a Windows 2003 Server with IIS6 where the validation controls on
ASP.Net pages no longer work.
I believe it to be specific to the server as if I create an ASP.Net page
on the IIS Server of my Workstation (Win XP) with a text box, button and
required field validator, this works fine. If I create the same page on
the IIS6 Windows 2003 Server the validation control doesn't stop the post.
I've tried different browsers and JavaScript is on!
For example if I have a number of panels in which the visibility is
turned on or off by the button click event this event still fires. The
visibility on the panel where the validation control is situated turns off and the
error message is never seen. If I leave the visibility on that panel
alone then I see the error message but the click event still fires (not much
use).
Looking at the code I presume that the validation control generates some
JavaScript which should be called on post. Is it possible that the Win
2003 Server isn't generating that JavaScript?
Anybody come across this before?
Any suggestions?
Martyn Fewtrell
mf*******@networkclub.co.uk