Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On_SelectedIndexChanged quits If page is not valid

Status
Not open for further replies.

enochsfootwear

Programmer
Aug 11, 2004
25
0
0
US
Hi,

I have a page that has a dropdown that queries the database to populate other controls on the form depending on what item was selected in the dropdown. There is also a CustomValidator. The problem I’m having is that if the page is submitted and the validation fails then the postback doesn’t work on the dropdown; the user is forced to make a couple different selections before the SelectedIndexChanged fires. Is this normal, is the user forced to make changes before the postback will work again?

Thanks
 
Why do you have values in your dropdown that would not pass the validator? Or is the validator on other controls?
 
The validator is for other controls. In this instance the form is letting users select params for a report which is opened in another window via JavaScript, if a report cannot be generated using the params the user selected then a message is displayed in the validator and the window is closed. That's when the problem starts, if the user selects a different param from the dropdown it doesn't postback, it takes a couple tries.
 
The page won't be able to post back until the page is valid, which means you have to clear the errors first. This is normal behavior
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top