DCSIMG
Asp.net - ArnonA

ArnonA

This blog is mainly about C#, TDD, ATDD and NHibernate

Browse by Tags

All Tags » Asp.net (RSS)
Creating ASP.Net CustomValidators that automatically creates the client-side (javascript) validation functions using expression trees – Part 2
Hi everyone! Last time I showed how you can use Expression Trees to create Custom Validators in ASP.Net that automatically generates the JavaScript code for the client-side validation. But there was one part I didn’t get into details and promised to explain it in the next post (this one), and that was how to translate specific methods and properties from C# to JavaScript. Of course that we could go with a trivial solution that simply maps the method and property names as strings, but that would have...
Creating ASP.Net CustomValidators that automatically creates the client-side (javascript) validation functions using expression trees
Hi everyone! This is my first blog and my first post ever, so wish me luck Recently I started to learn ASP.Net from a book, and I reached the topic that discusses the various Validators, including CustomValidator. I was disappointed to find that when you create a CustomValidator you must create both the client script and the server script manually, even though normally you want them to evaluate exactly the same expression. Of course that’s a problem because in the client side the function should...