In case you missed it, there was a September release of the Atlas Control Toolkit. Now, the big new feature is animation support. Which I must say is cool. But then again, if I wanted animation I would use flash. But there is another control in the toolkit which I have fallen in love with for a number of reasons: the ModalPopup.
There is, however, one big trick to making the ModalPopup post back to the server-side that the published examples do not make clear—how to allow the popup panel to fire a post-back. And, after half a day of struggling, I found the answer was actually disturbingly simple: just make sure any button you wish to post back is not handled by the ModalPopupExtender by simply ignoring the OnOkScript property.
The other issue a developer need be aware of is how validation controls behave when a ModalPopup comes into the picture:
- If the validator is on the underlying form, the client-side validators are ignored. The Page’s IsValid property is properly set. Which means, you, as the developer, must gracefully handle the potential invalidity of the submission coming out of the ModalPopup. I suspect someone a bit craftier than I with client-side script could find a way to prevent the popup from firing if the form was invalid.
- If the validators are on the control which is popped up, the client-side validation works nicely. However, CustomValidators without requisite client-side script will allow the form to be posted back, and the ModalPopup is not visible after postback.
Enjoy and keep it poppin’.
Using Python to Parse Spreadsheet Data
By Shaumik Daityari,
Working with large web apps often involves creating and parsing spreadsheets. Learn how to handle and parse these files using Python.
A Comparison of Ruby Version Managers for macOS
By Daniel Kehoe,
If you're a serious Ruby developer, you'll need an up-to-date version, possibly several. We cover the best Ruby version managers for macOS.
A Guide to Git Interactive Rebase, with Practical Examples
By Tobias Günther,
Even if you're a Git pro, there might be more Git tricks to discover. Learn about interactive rebase, one of Git's most powerful tools.