Validation controls seem to be breaking my pages - sometimes

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

Hi,

Has anyone experienced the problem where validation controls stop a
previously working page from submitting.

Sometimes, when I move between my work machine and my home machine
validation that was previously working perfectly just starts to bugger up
the page.

One normally happens is I'll have it working fine at work and then when I
bring it home, the validation works - in that it captures required fields
being empty and so on, but when the page shouldnt have any problems the
buttons on the page just refuse to do anything. They refuse to submit.

It took me a whilst to figure out that it was defineately the validation
controls that were causing the problems. I had to rebuild a page from
scratch and noticed that as soon as I added a required field validation
control the whole page wont submit when it should.

As soon as i remove the val control everything starts working again. Its
like when you press the button the code behind the page that does the submit
never gets called.

I'm sure I'm doing something stupid but I can't see what the problem is and
I' getting really fed up with it now.

Any help would be great.

Many thanks everyone

Simon
 
Has anyone experienced the problem where validation controls stop a
previously working page from submitting.
Sometimes, when I move between my work machine and my home machine
validation that was previously working perfectly just starts to bugger up
the page.

One normally happens is I'll have it working fine at work and then when I
bring it home, the validation works - in that it captures required fields
being empty and so on, but when the page shouldnt have any problems the
buttons on the page just refuse to do anything. They refuse to submit.

It took me a whilst to figure out that it was defineately the validation
controls that were causing the problems. I had to rebuild a page from
scratch and noticed that as soon as I added a required field validation
control the whole page wont submit when it should.

As soon as i remove the val control everything starts working again. Its
like when you press the button the code behind the page that does the submit
never gets called.

I've not had problems with submitting as such - but certainly I've
seen pages where adding a validation control breaks the onclick events
of controls. The reason in my case was that when you add a validation
control, some javascript is appended to whatever code you already have
for your onclick events. If you haven't terminated that code with a
semicolon, you end up with invalid javascript, which I think it
causing the problems you see.

HTH

Gareth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top