How to generate JS from the C#.NET code
Some time ago (like 3 or 4 years) I heard about ability to generate JavaScript (client) code based on C#.NET source code. I don't remember details, probably that was for validation purposes only...
If you know something about that, could 开发者_StackOverflowyou please remind?
Thanks a lot.
P.S. Any thoughts are welcome.
I know of two such projects. They compile C# code into client-side JavaScript.
- SharpKit - http://sharpkit.net/
- Script# - http://projects.nikhilk.net/ScriptSharp
I believe you're talking about the Script# project.
It allows you to compile a sub-set of C# into JavaScript.
For validation purposes, it may be that you saw something like xVal http://xvalwebforms.codeplex.com/.
I believe that MVC2 comes with something like this baked in.
精彩评论