views:

47

answers:

1

In my MVC2 site if a user enters lt/gt signs in a password box an exception is thrown because of "potentially dangerous..". ValidateInput(false) on my controller solves it but for something so simple (not html passing) yet needs to be protected what is a better alternative? I've briefly looked at http://wpl.codeplex.com/ but it also seems overkill

Thoughts? Your solution?

A: 

Hi ryan, use Javascript onsubmit event and escap your inputs before posting it to the server. that will allow you to do what you want.

You can unescap the data at server side as well.

lakhlaniprashant.blogspot.com
JavaScript isn't a reliable solution. It can be disabled.
ryan