By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 764 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

Validation controls seem to be breaking my pages - sometimes

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Sun, 31 Oct 2004 12:17:18 -0000, "Simon"
<sh856531@microsofts_free_email_service.com> wrote:
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
Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.