473,395 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Validator misery

Hi All

Just got my first ASP.net form running - a proud moment! The form has about
20 fields, and a few need to have values supplied. No problem - shoved in a
few RequiredFieldValidators and all was well.

After reviewing what I'd done, I decided to change the submit button from
being a link button to a regular button.

No problem thinks I - just hook up the previous button's event handler to
the new button and away we go. Except we didn't go anywhere. The
validators still appeared to work, but once all validations were satisfied,
the form was still not submitted.

Stripped off all the validators and the form is submitted fine (albeit that
no validation is performed). Add back a single validator and I'm stuck
again - i.e. it correctly spots and empty field, but even if you fill that
field the form is never submitted. Delete the validator so the form has
none and the form is submitted just fine.

I'm so disappointed , but hoping that this might be a well known newbie
error.

Any thoughts anyone?

TIA,
Peter
Nov 19 '05 #1
5 1114
What version of the .net framework. Also does ff produce different results
from ie?

Are all these imput type="text"?

Also, what are you performing on the button click event, to make it apparent
that the form submission is occuring properly?

Its not entirely out of the question that the asp.net validators are just
broke. They've got real erratic clientscript behavior in anything but ie.

Also if you are on .net 1.1 sp1, there are conditions like that where the
webuivalidation.js is off, and you need to re-copy an appropriate version.

Weston

"Pete Hearn" <tr***************@virgin.net> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
Hi All

Just got my first ASP.net form running - a proud moment! The form has
about
20 fields, and a few need to have values supplied. No problem - shoved in
a
few RequiredFieldValidators and all was well.

After reviewing what I'd done, I decided to change the submit button from
being a link button to a regular button.

No problem thinks I - just hook up the previous button's event handler to
the new button and away we go. Except we didn't go anywhere. The
validators still appeared to work, but once all validations were
satisfied,
the form was still not submitted.

Stripped off all the validators and the form is submitted fine (albeit
that
no validation is performed). Add back a single validator and I'm stuck
again - i.e. it correctly spots and empty field, but even if you fill that
field the form is never submitted. Delete the validator so the form has
none and the form is submitted just fine.

I'm so disappointed , but hoping that this might be a well known newbie
error.

Any thoughts anyone?

TIA,
Peter

Nov 19 '05 #2
Hi Weston - thank for responding.

Running .Net 1.1 with latest patches. Controls are TextBoxes, DropDownList
and CheckBox. Only using the RequiredFieldValidator. Worked fine
yesterday - having changed the submit button and nothing else, it's all
crashed and burned.

Based on what you're saying, the Validators are not very stable technology.
Perhaps I should just validate it all on postback.

Does ASP.Net 2 have improvements in this area?

Regards,
Peter
"Weston Weems" <ww****@NOSPAMno-span-gmail.com> wrote in message
news:eM**************@TK2MSFTNGP10.phx.gbl...
What version of the .net framework. Also does ff produce different results
from ie?

Are all these imput type="text"?

Also, what are you performing on the button click event, to make it apparent that the form submission is occuring properly?

Its not entirely out of the question that the asp.net validators are just
broke. They've got real erratic clientscript behavior in anything but ie.

Also if you are on .net 1.1 sp1, there are conditions like that where the
webuivalidation.js is off, and you need to re-copy an appropriate version.

Weston

"Pete Hearn" <tr***************@virgin.net> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
Hi All

Just got my first ASP.net form running - a proud moment! The form has
about
20 fields, and a few need to have values supplied. No problem - shoved in a
few RequiredFieldValidators and all was well.

After reviewing what I'd done, I decided to change the submit button from being a link button to a regular button.

No problem thinks I - just hook up the previous button's event handler to the new button and away we go. Except we didn't go anywhere. The
validators still appeared to work, but once all validations were
satisfied,
the form was still not submitted.

Stripped off all the validators and the form is submitted fine (albeit
that
no validation is performed). Add back a single validator and I'm stuck
again - i.e. it correctly spots and empty field, but even if you fill that field the form is never submitted. Delete the validator so the form has
none and the form is submitted just fine.

I'm so disappointed , but hoping that this might be a well known newbie
error.

Any thoughts anyone?

TIA,
Peter


Nov 19 '05 #3
RCS
fwiw - if you use SmartNavigation (e.g. you have SmartNavigation="true" on
the @page directvie) - that seems to consistently mess up the validators -
or if you have multiple validators on one page. SmartNavigation works really
well on small/simple pages - but if you have more than a couple things going
on - it messes up lots of things.

hth

"Pete Hearn" <tr***************@virgin.net> wrote in message
news:ep**************@TK2MSFTNGP12.phx.gbl...
Hi Weston - thank for responding.

Running .Net 1.1 with latest patches. Controls are TextBoxes,
DropDownList
and CheckBox. Only using the RequiredFieldValidator. Worked fine
yesterday - having changed the submit button and nothing else, it's all
crashed and burned.

Based on what you're saying, the Validators are not very stable
technology.
Perhaps I should just validate it all on postback.

Does ASP.Net 2 have improvements in this area?

Regards,
Peter
"Weston Weems" <ww****@NOSPAMno-span-gmail.com> wrote in message
news:eM**************@TK2MSFTNGP10.phx.gbl...
What version of the .net framework. Also does ff produce different
results
from ie?

Are all these imput type="text"?

Also, what are you performing on the button click event, to make it

apparent
that the form submission is occuring properly?

Its not entirely out of the question that the asp.net validators are just
broke. They've got real erratic clientscript behavior in anything but ie.

Also if you are on .net 1.1 sp1, there are conditions like that where the
webuivalidation.js is off, and you need to re-copy an appropriate
version.

Weston

"Pete Hearn" <tr***************@virgin.net> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
> Hi All
>
> Just got my first ASP.net form running - a proud moment! The form has
> about
> 20 fields, and a few need to have values supplied. No problem - shoved in > a
> few RequiredFieldValidators and all was well.
>
> After reviewing what I'd done, I decided to change the submit button from > being a link button to a regular button.
>
> No problem thinks I - just hook up the previous button's event handler to > the new button and away we go. Except we didn't go anywhere. The
> validators still appeared to work, but once all validations were
> satisfied,
> the form was still not submitted.
>
> Stripped off all the validators and the form is submitted fine (albeit
> that
> no validation is performed). Add back a single validator and I'm stuck
> again - i.e. it correctly spots and empty field, but even if you fill that > field the form is never submitted. Delete the validator so the form
> has
> none and the form is submitted just fine.
>
> I'm so disappointed , but hoping that this might be a well known newbie
> error.
>
> Any thoughts anyone?
>
> TIA,
> Peter
>
>



Nov 19 '05 #4
certainly had multiple validators on a page but it did work at the time -
now it doesn't. Sounds like the technology is a bit flaky - I'll wait for
ASP.Net 2.0!!

Thanks for your input RCS - much appreciated!

"RCS" <rs****@gmail.com> wrote in message
news:VA***************@newssvr31.news.prodigy.com. ..
fwiw - if you use SmartNavigation (e.g. you have SmartNavigation="true" on
the @page directvie) - that seems to consistently mess up the validators -
or if you have multiple validators on one page. SmartNavigation works really well on small/simple pages - but if you have more than a couple things going on - it messes up lots of things.

hth


Nov 19 '05 #5
Just in case anyone's interested, the solution is:

stop IIS
run aspnet_regiis -ea // this deletes the existing javascript libraries
run aspnet_regiis -c // this re-creates the scripts from scratch
start IIS // you're done

Hope this might help anyone else who's validators stop the postback from
happening
Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

195
by: Torbjørn Pettersen | last post by:
As you might have noticed I'm trying to clean up my web site's HTML code. The way I do it is simply more or less redoing to complete site, testing it on a web server I have set up on my local...
0
by: John Bailo | last post by:
Why does Jeff Relf spread such misery ??? Could it be that others shun him because of the bright glow shining from his chrome a dome. ??? -- W '04 <:> Open Source
0
by: Tom Pearson | last post by:
I create controls and validators dynamically dependent on data at runtime. I create the control then the relevant validator(s) for it assigning the Control.ID as the control to validate. These...
8
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the...
40
by: VK | last post by:
Hi, After the response on my request from W3C I'm still unclear about Tidy vs. Validator discrepansies. That started with <IFRAME> issue, but there is more as I know. Anyway, this very basic...
2
by: Mike Collins | last post by:
I have a form where I create dynamic controls at runtime. With this, I am adding a dynamic required field validator to each control as needed, but the validators are not firing when I click submit....
6
by: yaru22 | last post by:
I'd like to create a program that validates bunch of urls against the w3c markup validator (http://validator.w3.org/) and store the result in a file. Since I don't know network programming, I...
1
by: Gonza | last post by:
Hi group, i'm trying to add a customvalidator control to a custom web control. The problem is i'm getting a "Unable to find control id..." exception. Here is the code: public class CuitTextBox :...
37
by: Prisoner at War | last post by:
Actually, it doesn't have to be a blockquote...but I'm at my wits' end: I want to make bold several lines of text which have a pair of <br /tags between them...seems like the <b></bdo not "carry...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.