JQuery’s $ is in conflict with that of StringTemplate.Net in ASP.Net MVC

You can of course move your js logic into a .js file. But if you want it inline with your StringTemplate views, you can escape it using the \$ construct.

In addition, you can simply use the jQuery(“selector”), instead of $(“selector”) construct if you want to avoid the escaping syntax.

Here’s a good article on using StringTemplate as a View Engine in MVC.

There’s also an accompanying OpenSource engine, along with some samples.

Also, as mentioned above, you can modify your Type Lexer. (make it an alternate character to the $).

Leave a Comment