desmondling78
March 7th, 2006, 07:32 PM
Hi,
I am looking for suggestions on validation on a page and usercontrol. I have a webpage test.aspx and a use control UserControl.ascx.
Test.aspx
txtName (textbox)
rfvCheckName (RequiredFieldValidator to check txtName)
btnSubmitName (button)
UserControl.ascx
txtTel (textbox)
rfvCheckTel (RequiredFieldValidator to check txtTel)
btnSubmitTel (button)
Now, the required RequiredFieldValidator (RFV) works fine for the aspx and ascx. However, When I add the usercontrol into the test.aspx, a problem occurs:
txtName (test.aspx) is empty
txtTel (usercontrol.ascx) has input,
When I click on the btnSubmitTel (usercontrol.ascx), it activates the rfvCheckName (test.aspx)! How can I force each button to activate only certain RFV? (If its possible at all) Or is there any work around to this?
Thanks
I am looking for suggestions on validation on a page and usercontrol. I have a webpage test.aspx and a use control UserControl.ascx.
Test.aspx
txtName (textbox)
rfvCheckName (RequiredFieldValidator to check txtName)
btnSubmitName (button)
UserControl.ascx
txtTel (textbox)
rfvCheckTel (RequiredFieldValidator to check txtTel)
btnSubmitTel (button)
Now, the required RequiredFieldValidator (RFV) works fine for the aspx and ascx. However, When I add the usercontrol into the test.aspx, a problem occurs:
txtName (test.aspx) is empty
txtTel (usercontrol.ascx) has input,
When I click on the btnSubmitTel (usercontrol.ascx), it activates the rfvCheckName (test.aspx)! How can I force each button to activate only certain RFV? (If its possible at all) Or is there any work around to this?
Thanks