Adding script block to RadScriptManager

Posted by Community Admin on 03-Aug-2018 15:56

Adding script block to RadScriptManager

All Replies

Posted by Community Admin on 07-Mar-2011 00:00

Hi,

I had a jquery script which was failing because SF redefines jQuery in its included code. I don't want to try and remove the scripts that SF includes, but rather I'd like to know how to register an on-page script block with the RadScriptManager.

The only reason it is currently on-page rather than in an external file is because I have to get some of the Client ID's using c#, therefore I am currently using the StringBuilder to build my JS, then adding it to the page using page.RegisterClientScriptBlock. The problem is that this is registered after the external file which I do load using the RadScriptManager.

How would I get round this?

Thanks
higgsy

Posted by Community Admin on 10-Mar-2011 00:00

Hi higgsy,

You could subscribe to the onload event of the page and do your work with jQuery there. As far as I know this is the only way.

Hope this helps.


All the best,
Lyubomir Dokov
the Telerik team

This thread is closed