Razor syntax in Javascript files
I don't always mix server side code with client side code... but continuing with my thoughts on server and client models . I wanted to know if I could use razor syntax in a javascript file. Which means I woud be able take advantage of the Asp.net Bundling and Minification feature. Now I probably didn't bring this approach up in the article but what I did talk about was using query url with the javascript. Not being able to cache javascript files is the major reason why avoid using using it and I didn't think I would take this approach either but I did want to see if it was possible. In my research I did notice some loss of performance, I didn't do any benchmarking but I felt the process was a little wonky. I think the third link best describes my thoughts on this approach. So what I have been doing now since this is using the "data" attribute and assigning a value with razor syntax. It's not complete...