We have a particular situation in which I need to generate a response entirely server-side via Response.Write. We are using Telerik's embedded copy of jQuery and in this particular response, I need to include the jquery script. Doing a bit of investigation, I came up with this:
'" + Request.ApplicationPath + "/Telerik.Web.UI.WebResource.axd?compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d1.0.61025.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1f0f78f9-0731-4ae9-b308-56936732ccb8%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3ad89f6e67-3ab0-4fcf-b5f1-b51b735ae3d9%3a16e4e7cd%3af7645509%3a24ee1bba%3a1e771326%3aaa288e2d'
Not pretty and seems a bit unreliable. I tried to instantiate a RadScriptManager control server-side, add the core scripts programmatically and then call RenderControl on the manager object, but couldn't get around an exception thrown stating that the control must be inside of a <form runat="server">.
Is there a better way of doing this? Cleaner and standardized? What are the parameters for the Telerik.Web.UI.WebResource.axd?