I was just reading thru Nikhil's posts about the new build of Atlas and I cam across this interesting little nugget of information. You can stop an async operation through the <ProgressTemplate> by creating a special button with the id of "abortButton." I like the idea, however, I just hate magic numbers, or buttons in this case. Perhaps the team could put in some type of special attribute on a regular button or something like that....................
The special attribute (on a regular button, image button, etc.) happens to be "id", and the value we look for happens to be "abortButton" :-)
Any other attribute or value would be equally "special", right?
I couldn't agree more!
This is actually a standard way ASP.NET 2 works with certain templated controls, nothing specific to Altas.
To get your head around this, get visual studio to output a template for the asp:Login control (use the ToolTip and pick the option to "convert to Template"). Note that there are lots of buttons that have a particular action based on the ID of the button.
In general, one of the nice things introduced with ASP.NET 2 controls was this ability for a control to have behaviour, but for the exact template of the control to be completely up to the page developer, as long as they give the right buttons/labels/etc the correct IDs.
I hope this helps.
Entirely agree with you,intro of magic "id"s smells bad;-)