We have many transactions for eg:CashDeposit that are defined in xml eg:CashDeposit.xml.
That XML is converted in to controls and placed in an usercontrol.
While loading each Transaction we are loading an js file dynamically eg:CashDeposit.js for CashDeposit.
This is the code for loading the Js file dynamically:
string txnJS = "../ClientScripts/" + SessionManager.CurrentTransName + ".js";
ScriptReference dynamicJS = new ScriptReference(txnJS);
scrMain.Scripts.Add(dynamicJS);//scrMain is asp:ScriptManagerProxy
then a method called ChkLoadBody() in the currentTransaction.js for eg:CashDeposit.js is invoked from the codebehind as: Go to the complete details ...