473,386 Members | 1,779 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,386 software developers and data experts.

Asp.net wont validate form

Hi everyone

I have a web form where the validation works pefectly

I copied the file, renamed it, and all of a sudden the validation stopped
working(on the copied form). I have two panels on them. Both have validation
controls in them and only one panel is visible at a time. The first panel
validtion works fine, but the 2nd one doesnt. All it has is few textboxes, a
requiredValidator and a image command button. The valdiation is server side
too.

When the textbox is empty, an error is suppose to fire up. But it does not.
I call Me.Validate manually and then check Me.IsValid but it always returns
true. Then I even call the validation control's Validate() function and
nothing.

anyone has any ideas?

Adrian

Nov 19 '05 #1
2 1235
When you copied the form, did you go back and make sure all of the internal
names matched the copied name? If not, you might still be running against the
old CodeBehind (assuming VS.NET 2002/3 and not VS 2005).

I would go through debug and see what is being called. You may have also
lost your event wiring (Handles MYButton_Click at the end of the event
method). This is common when you dink with things outside of the normal
day-to-day ops. If so, you are not even firing an event on that button, so
you will not validate. In Debug, you will notice this really fast, as you
will never hit a breakpoint.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"Adrian" wrote:
Hi everyone

I have a web form where the validation works pefectly

I copied the file, renamed it, and all of a sudden the validation stopped
working(on the copied form). I have two panels on them. Both have validation
controls in them and only one panel is visible at a time. The first panel
validtion works fine, but the 2nd one doesnt. All it has is few textboxes, a
requiredValidator and a image command button. The valdiation is server side
too.

When the textbox is empty, an error is suppose to fire up. But it does not.
I call Me.Validate manually and then check Me.IsValid but it always returns
true. Then I even call the validation control's Validate() function and
nothing.

anyone has any ideas?

Adrian

Nov 19 '05 #2
When I copied the form, what I really did (sorry for not being clear before)
before is I created the file through VS.net(2002), renamed the class within
the code. Then I just copied the html portion to the new file.

My buttons do have their handles setup correctly too. I even deleted all the
textboxs and the validators and recreated them and no luck.

- Adrian

"Cowboy (Gregory A. Beamer) - MVP" wrote:
When you copied the form, did you go back and make sure all of the internal
names matched the copied name? If not, you might still be running against the
old CodeBehind (assuming VS.NET 2002/3 and not VS 2005).

I would go through debug and see what is being called. You may have also
lost your event wiring (Handles MYButton_Click at the end of the event
method). This is common when you dink with things outside of the normal
day-to-day ops. If so, you are not even firing an event on that button, so
you will not validate. In Debug, you will notice this really fast, as you
will never hit a breakpoint.

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"Adrian" wrote:
Hi everyone

I have a web form where the validation works pefectly

I copied the file, renamed it, and all of a sudden the validation stopped
working(on the copied form). I have two panels on them. Both have validation
controls in them and only one panel is visible at a time. The first panel
validtion works fine, but the 2nd one doesnt. All it has is few textboxes, a
requiredValidator and a image command button. The valdiation is server side
too.

When the textbox is empty, an error is suppose to fire up. But it does not.
I call Me.Validate manually and then check Me.IsValid but it always returns
true. Then I even call the validation control's Validate() function and
nothing.

anyone has any ideas?

Adrian

Nov 19 '05 #3

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

Similar topics

5
by: Scott D | last post by:
I am trying to check and see if a field is posted or not, if not posted then assign $location which is a session variable to $location_other. If it is posted then just assign it to...
1
by: Techy | last post by:
I have two fields in my form so called : invoice and cash Now I want to validate this form on the client side with the help of javascript in such a way that if one of these fields is empy an...
4
by: Alonso | last post by:
Hello everybody! :-D I am trying to validate a select object in a form. It does not work fine in Explorer 6.0 because it always send the form, but in Netscape 7.0 it works really fine. The code...
1
by: Jack Wheeler | last post by:
I have a basic form with some textboxes and several requiredfielfvalidators. On my development machine, the validation for this form works fine. On the remote server, the form posts back with no...
4
by: Wysiwyg | last post by:
I need to validate a form to ensure that all of the fields add up correctly. I can't do this while the user is entering data since validation needs to be done after the entry is completed. What's...
3
by: Martin | last post by:
Hi, I am implemeting a form in asp.net. The form is quite large and the validation is reasonably complex, so I have decieded to implement my own validation rather than use any custon...
11
by: TokyoJ | last post by:
I run a small camp in Alaska for kids and my director is asking for a web form. Could someone please have a look and offer some advice on where I'm making mistake(s)? I'm using the RegExp function...
7
by: Ivan Jericevich | last post by:
For some reason the update does not change the data in the database. It was working fine before, I checked that the bindingsource and tableadapter are still on the form....what else could be wrong?...
1
by: SkipNRun | last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.