I’m going through my colleagues code, he has written several Page.IsValid checks but I can’t find a single validation control on the pages.
Is it true that without any validation controls, the Page.IsValid will always be true? And hence, it’s practically useless checking Page.IsValid, isn’t it?? please advice me with some info on this
To use
Page.IsValid, first invokePage.Validate(), which setsPage.IsValidto either true or false based on the validity of all validation server controls in thePage.Validatorscollection.If you access
Page.IsValidbefore invokingPage.Validateit may not contain a correct value.MSDN Documentation: http://msdn.microsoft.com/en-us/library/system.web.ui.page.isvalid(v=vs.71).aspx