Hi,
I have a login web control which appears on quite a few other pages which has validation rules which I would like to keep separate from the validation rules on the pages it appears.
I have specified all the controls on the login web control as a ValidationGroup however this still causes errors on the new registeration page which uses: Page.Validate.
I was advised that the only way round this would be to either specify all the other controls into individual validation groups and as it would be time consuming doing this manually perhaps a foreach statement could help with this, can anyone help with this statement or advise me of a better/easier way?
Some related code below for the possible foreach statement (this needs correction:
foreach (Control c in Page.Controls)
if (typeof ( ) == c.getTypes)
{
if (c.ValidationGroup) (String / nullorempty
c.ValidationGroup = "page x"
}
Any he ...
Go to the complete details ...