views:

260

answers:

1

i have a change password control within a a collapable div controled via jquery, when the user clicks change password if there are any validation errors asp.net validation controls are displayed. However, because the div is collapsed by default when the postback occurs the div is collapsed so you have to click the change my password to see the validation messages.

what the best way set the div to be expanded if the validation message are shown?

+2  A: 

You can use Page_ClientValidate() function to check if there are any Validation errors. If it returns false then you can keep div visible.

TheVillageIdiot