Support for embedded scripts

Jul 27, 2010 at 12:43 PM
This project is really great. I was missing ToolkitScriptManager's functionality in ASP.NET MVC. With TSM I could load scripts dynamically from my modules. But can you also provide support for embedded scripts and css files? Like using virtualpathprovider. It would make creation of modular MVC applications much easier. Anyway, thank you for this project.
Jul 30, 2010 at 12:31 AM
Edited Jul 30, 2010 at 12:44 AM

Thanks for your interest in the project....

You can embed scripts with the current release as follows...

ToastCore.CommonContent.Add(Content.From(@"function demoLog(msg) { $('#scriptsLoaded').append('<br>' + msg); }","inline-added-script.js", InjectAt.HeadBottom));

(sample taken from the documentation)

I have been working on CSS support, but time available for development on this project is very limited at the moment.

You can currently add css references as follows..



(sample taken from the demosite)

Aug 4, 2010 at 9:54 AM

Hi dve,

By embedded js I mean javascript that is embedded into the assembly as a resource.

Sep 3, 2010 at 3:58 PM

Ok, I see. I will add it to the todo list!