A
Adrita
Hi,
I have a form which has an <asp:listbox> and a lot of other
<asp:textbox>s which have their own <asp:requiredfieldvalidators>.
The Listbox is the first control on the form. I want to show a certain
hidden field when a particular value is selected in the listbox. This
is done by setting the autopostback value of the listbox to True and
handling the SelectedIndexChanged of the listbox. This happens fine,
but since this enforces a postback, all the form required field
validators are fired too and i see a list of error messages in the
<asp:validationsummary> control (Netscape) because i have not yet got
to filling up the rest of the values on the form.
Is there a way that I can do an autopostback from a listbox and choose
NOT to fire the validations on the page? Only the Button's Postback
should fire the validations. The problem is that, unlike the
"CausesValidation" property of an <asp:button> (which can be set to
false, if required) there is no such property for the <asp:listbox>.
Thanks,
Adrita
I have a form which has an <asp:listbox> and a lot of other
<asp:textbox>s which have their own <asp:requiredfieldvalidators>.
The Listbox is the first control on the form. I want to show a certain
hidden field when a particular value is selected in the listbox. This
is done by setting the autopostback value of the listbox to True and
handling the SelectedIndexChanged of the listbox. This happens fine,
but since this enforces a postback, all the form required field
validators are fired too and i see a list of error messages in the
<asp:validationsummary> control (Netscape) because i have not yet got
to filling up the rest of the values on the form.
Is there a way that I can do an autopostback from a listbox and choose
NOT to fire the validations on the page? Only the Button's Postback
should fire the validations. The problem is that, unlike the
"CausesValidation" property of an <asp:button> (which can be set to
false, if required) there is no such property for the <asp:listbox>.
Thanks,
Adrita