skip to content »

nokia-phone.ru

Asp net form not validating

asp net form not validating-68

As briefly explained in the topic I can't seem to have client side validators to work.

asp net form not validating-21asp net form not validating-75asp net form not validating-21asp net form not validating-52

When users enter values into an HTML form, the values that they enter are strings.Once it comes to serverside validation, it's your job to make sure that no sensitive code is executed unless you want it to.As you see, it's very simple - just check the Page. Try to run the website again, and notice how the text of the button is changed if you submit a valid form.Here setting validate All Properties = true is the important part.If it is false then it will perform only the first default validation 'Required' and it will not check other Validation for the properties like 'Regularexpression', 'Range', etc.Now you will see the browser posting back to the server, but the result will be the same - the validator still works!

Right now, the button does nothing, besides posting back if the page is valid.

I copied exactly your example on demo page of Rad Input validation do do further testing but with no results (I even stripped it down a basic 1 textbox 1 validator, I tryed with standard asp textboxes, I searched the web for 4 hours now finding all kind of answers even in this forum, all with no luck).

Things I can say in advance: - The script resources all loads correctly (checked both in Google Chrome developers console and Firefox Firebug consol.

We will change this by adding an onclick event to it: As you will notice, we check whether or not the page is valid, before we do anything.

This is very important, since this code WILL be reached if the clientside validation is not used, for some reason.

after 4/5 unsuccessfull hours at a simple task like validation should be, even in the simpliest scenarios I tested, I really give up.