I have two UpdatePanels in my form, both containing several DropDownLists and TextBoxes, most of which need to be validated. I have a validation summary and validators grouped together in a separate div. The div is not inside either of the update panels. And I finally have a button that isn’t either in any UpdatePanels. How can I make sure that by just clicking button I get all my controls validated and shown in the validation summary?
I have two UpdatePanels in my form, both containing several DropDownLists and TextBoxes ,
Share
Believe me I achieved this without doing any of these suggestions. I just set validation group of my button and all the validators to the same value. That’s it.Let me remind you the case: I have a two updatepanels.Validators of the controls on the first panel are in a seperate div, which is not contained in either of the panels. The second update panel has only one control to validate so I’ve put its validator to the same panel. And I have a button that’s completely apart from all these. When I click the buton I can get all the validation messages summarized in the validationsummary. However a very strange thing still remains a secret: As I said validators of the first panel controls are outside that panel and they work pretty well. But if I take the only validator from the second update panel and put it among the other validators I don’t get that single validator’s message. I’m almost sure that this is a bug in Visual Studio as I’ve witnessed many things like this.