Dynamically adding validation controls to a validation summary

G

Guest

I have a number of validation controls on a webform and a validation summary.
Two of the controls are hidden (contained in a Fieldset that is hidden) when
the page is first loaded and I want to add them to the validation summary
depending on a selection made in a dropdownlist on the form.

In the page load event I have added an If IsPostBack statement and tried to
add the new controls with the add event but that does not work.

Any ideas?

Thanks
 
G

Guest

Hmm, if the controls are hidden they're not rendered. The ValidationSummary
works for all validation controls on a given page, so the server roundtrip
after making a selection in your list, should work. I wonder though, if
you're enabling/disabling the validation controls as well as the controls to
validate, or just the validation controls? Your Fieldset, of which type is
it, and how is it hidden?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top