ASP.NET MVC2 - Trim of whitespace on all fields in a model? -


I have data in the ASP.NET MVC2 controller / view set-up.

Unfortunately, all the data that comes from the scene, finally there is a large amount of white space.

I am trying to try TryUpdateModel after saving all form data in DB, after verification, a FormCollection is assigned to a parameter (such as Form to Vell Provider).

Is there any automated or easy way to trim all the backward white space from all the objects within the formulation?

The simplest I can think:

  formCollection.AllKeys.Select (K = form formation .set (k, form selection). Trim ()))  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -