Fix JavaScript error in ASP.NET MVC (the correct way). Are you doing it right?

Published --