1

Closed

ModalPopupExtender does not recognize incorrect OkControlID or CancelControlID

description

If ModalPopupExtender is told to look for an OkControl or CancelControl that doesn't exist, the error is not caught until later on, when it creates a Sys.ArgumentNullException. In my case, the exception is raised here:
function Sys$CultureInfo$_getAbbrMonthIndex(value) {
if (!this._upperAbbrMonths) {
this._upperAbbrMonths = this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames);
}
return Array.indexOf(this._upperMonths, this._toUpper(value));
}

Steps to reproduce:
  • create a popup div including buttons with IDs to be used for OK/Cancel in the popup
  • add a ModalPopupExtender which uses that div as the popup control
  • add either the OkControlID or CancelControlID attribute to the ModalPopupExtender, but misspell it
  • open the page with the popup and look at Javascript errors
Shouldn't this give some other sort of error earlier on, such as "There is no control with id='foo'"?
Closed Aug 7, 2007 at 9:05 PM by

comments

link5225 wrote Aug 7, 2007 at 4:25 PM

Sorry, I accidentally put this bug in the wrong issue tracker (CodePlex instead of AtlasControlToolkit). Someone can close this issue, since it's in the wrong place.