crazyboybert
Programmer
Hi All
I have 2 .ascx controls (say a.ascx and b.ascx) on the same aspx page(say form.aspx). Sometimes one or the other is visible sometimes both. When only one of the controls is visible when i call Page.IsValid from the codebehind form for the control(say a.ascx.cs) it only validates the control a.ascx. However if both the controls are visible then a call of Page.IsValid from the codebehind file of either control (a.ascx.cs or b.ascx.cs) causes validation on the entire webform - form.aspx.
is there anyway to make a user control only validate the fields within it or am i going to have to specifically check the value of each field on the relevant control when both are visible on the page.
Thank in advance for any help
Rob
------------------------------------
On with the dance! let joy be unconfined;
No sleep till morn, when Youth and Pleasure meet
To chase the glowing hours with flying feet.
-Byron
------------------------------------
I have 2 .ascx controls (say a.ascx and b.ascx) on the same aspx page(say form.aspx). Sometimes one or the other is visible sometimes both. When only one of the controls is visible when i call Page.IsValid from the codebehind form for the control(say a.ascx.cs) it only validates the control a.ascx. However if both the controls are visible then a call of Page.IsValid from the codebehind file of either control (a.ascx.cs or b.ascx.cs) causes validation on the entire webform - form.aspx.
is there anyway to make a user control only validate the fields within it or am i going to have to specifically check the value of each field on the relevant control when both are visible on the page.
Thank in advance for any help
Rob
------------------------------------
On with the dance! let joy be unconfined;
No sleep till morn, when Youth and Pleasure meet
To chase the glowing hours with flying feet.
-Byron
------------------------------------