I am exploring ASP.NET MVC and I wanted to add jQuery to make the site interactive. I used StringTemplate, ported to .Net, as my template engine to generate html and to send JSON. However, when I view the page, I could not see it. After debugging, I've realized that the $ is used by the StringTemplate to access property, etc and jQuery uses it too to manipulate the DOM. Gee, I've looked on other template engines and most of them uses the dollar sign :(.
Any alternative template engine for ASP.Net MVC? I wanted to retain jQuery because MSFT announced that it will used in the Visual Studio (2008?)
Thanks in Advance :)
Update
Please go to the answer in ASP.NET MVC View Engine Comparison question for a comprehensive list of Template engine for ASP.NET MVC, and their pros and cons
Update 2
At the end I'll just put the JavaScript code, including JQuery, in a separate script file, hence I wouldn't worry about the $
mingling in the template file.
Update 3
Changed the Title to reflect what I need to resolve. After all "The Best X in Y" is very subjective question.
In case you want to stick with StringTemplate (ST) see this article from the ST wiki. You may also change the behaviour totally by editing Antlr.StringTemplate.Language\DefaultTemplateLexer.cs and replacing the "$" with what you want.
I would highly recommend Spark. I've been using it for awhile now with jQuery and haven't ran into a single issue so far.
Perhaps jQuery.noConflict will work for you
Have a look at the mvccontrib project. They have 4 different view engines at the moment which are brail, nhaml, nvelocity and xslt.
http://www.codeplex.com/MVCContrib
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 $).
You could try jsRepeater.