mike55 Posted October 17, 2005 Posted October 17, 2005 Hi all, Have a number of required field validators on my web form. The EnableClientScript is set to False. I also have validation summary control on my page. When I hit the save button, a method called ExecuteValidation is called. This method firstly calls the individual validators. me.requiredFieldValidator1.validate me.requiredFieldValidator2.validate me.requiredFieldValidator3.validate The method then proceeds to check if the validator is correct or not. if me.requiredFieldValidator1.isvalid = false then ExecuteValidation = false end if if me.requiredFieldValidator2.isvalid = false then ExecuteValidation = false end if if me.requiredFieldValidator3.isvalid = false then ExecuteValidation = false end if The problem that I am having is that I want the validation statements for requiredFieldValidator 1, 2, and 3 to appear in the order 1, 2, 3. However I practice the order is constantly changing. Any suggestions on how to control the order? Mike55. Quote A Client refers to the person who incurs the development cost. A Customer refers to the person that pays to use the product. ------ My software never has bugs. It just develops random features. (Mosabama vbforums.com)
Administrators PlausiblyDamp Posted October 17, 2005 Administrators Posted October 17, 2005 IIRC you shouldn't have to manually invoke the validators on a post back - the framework should invoke them automatically. If you want to check if things worked or not you could then check to see if a validator is valid or not or alternatively just query Page.IsValid to detect if any errors are present and act accordingly. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.