Ok, I have a major issue with a control I am using.
The site I'm doing uses custom units for some fields in their checkout (who decided that horses should be measures in hands for god's sake?!), and we have to be able to validate based on the unit selected, i.e. they can have between 15 and 40 hands (or something) which is 200 - 900 cm (these numbers are completely random fyi).
normally, this would be validated using server-side validation to allow us to process the current unit, convert the input appropriately and compare to the dynamic limits.
Unfortunately, these controls are being dynamically rendered onto the page on page load, and so the server side validation isn't firing as they don't technically exist on post back.
What I intend to do to avoid this is to use another method that we've used before, similar to a standard regex validator but hacked to allow code behind (I didn't write it but they seem to work).
This is not on the page, however, and so I would need to access the page object via HttpContext or some other method in order to get the correct units from a related dropdown, can anyone suggest either a way to do this or a better way to validate the controls?
Oh, and yes this is incredibly convoluted and random.
Cheers, Ed