Ah-ha moments

Coordinator
Jun 11, 2007 at 5:18 PM
I've spent the last week or two trying to figure out how the AJAX framework. Especially using the Modal popup. Then I grabbed the latest version, and read some articles, and realized that if you setup a dummy link as the targetcontrolid, you can instead show and hide the modal from server side code.

This makes it easier to handle an OK button, as you want to do some work and then hide the modal.

But more importantly it also makes it easier to handle Command buttons within the gridview, as you want to change what is displayed by the Modal based upon what is selected.

This was one of these ah-ha moments, that makes life easier.

Still, I'm not a huge fan of putting all of my functionality into one page. I'd like to break it out into user controls, which makes it a bit easier to compartmentalize what I'm doing. I need to relook at this, perhaps with this new insight I can change the contents of what's in the Modal more easily by setting a property on the user control prior to displaying the content.

The other ah-ha, was realizing that even though the panels are not displayed, the buttons all kick off the same client side validation. So this means making use of validation groups, etc.

With these ah-ha moments, things are finally coming together with what I want to do.