Topic: Re: Adding event handlers server side
Karamasoft Support Forums

Page 1 of 1 (2 items)

Posted by troops12 on 12-06-2007 10:24 AM

I have been putting UltimateSpell through its paces on some test projects for work. The last thing I need to do is use the control in a page with dynamically added controls within a form generator. I am placing the UltimateSpell control on the base page and then adding many other custom controls on the page after the UltimateSpell has already been loaded. I can emit javascript to add the event handlers for my custom controls, but they are being loaded after the Load event for the UltimateSpell control has already fired. Is there a way to add events server side without having to use javascript? For example as I am loading each control I am adding the control to the ControlIDSToCheck can I add event handlers at the same time? Thanks

Posted by Karamasoft on 12-06-2007 11:05 AM
Which kind of event handlers are you trying to add? UltimateSpell has a [ultimateSpellId]_OnLoad() function template on the client-side to handle window onload events after the UltimateSpell control is completely loaded and ready to be reached by the UltimateSpells and UltimateSpellAsYouTypes collections on the client-side. You can use it as follows:

function UltimateSpell1_OnLoad() {/* custom function */}


function <%=UltimateSpell1.ClientID%>_OnLoad() {/* custom function */}

You can see more UltimateSpell client-side API at http://www.karamasoft.com/UltimateSpell/ClientAPI.htm

If you let us know more about what exactly you are trying to achieve, we can help you better. Some sample code would help. Thanks.