Nearly there
This is what you can do with validation in ASP.NET and as
you can see you can do a lot. If you go to my page
here, or
the page using this code
here, then you can experiment with creating
errors and seeing what happens (there are some source changes). The changes to
the source are - some control's Display is none so it only appears in the
Summary. You will also notice that with the CustomValidator, the validation
will occur on the server, so you get the message "Validation Passed" and then
the error, to fix that, use Client-Side Java-Script, as you can see -
...... OnClientSideValidate="Validating".....
<Script language="JavaScript">
function validating( objSen, txtVal){
var isvalid = True;
if(txtVal.length < 8){
isvalid = False;)}
return isvalid
}
</script> |