|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Dynamically adding validation controls to a validation summaryI 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 -- Westie 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? -- Show quoteCarsten Thomsen Senior .NET Solutions Architect / Developer / Author MCAD/MCSD/MCSE/MCTS "Westicle" <Westi***@discussions.microsoft.com> wrote in message news:9E2AD6F9-01B1-4E52-B03D-5DA3D4CA11CD@microsoft.com... >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 > -- > Westie |
|||||||||||||||||||||||