Quick question. I want to create a validation control on the codebehind, but don't want it associated to anything. Want it more like a flag, but want access to the Page.IsValid stuff.
Basically, I have a tonne of validation happening now, but have some extra stuff going on, but need a flag for it. But its all server side stuff (doing db calls, some business logic, etc), that has no controls or anything.
But I want this validation control to have the IsValid stuff, so that I can simply check it in the validation routine (is true or false).
I kind of have it, but having an issue. I created a RequireFieldValidator via:
RequiredFieldValidator rfvInitator = new RequiredFieldValidator();
And its on the codebehind, and then assoicated within a method, and forcing:
rfvInitator = true / rfvInitator = false.... depend on the results.
Now, when I go to the validation button, the page doesn't seem to reconize this. I'm assuming its cause its not associated to a control of any type. If theres a way to do this programmically, great, but would rather not have a hidden textbox and a validation control on that (all hidden), to get this to work... Shouldn't there be something better? Or am I smokin' something?