javascript - HTML.Textbox validate a string entered in a textbox -
There is no way to validate the information entered in this text box code -
@ Html.TextBox (string.Format ("Customer.CustomerMeasurementProfiles [{}}. Customer Measurement [{.} Value", i, k), oMeasurement.Value, new {@class = "Form-Control Input-SM "})
I have to see if it is empty or empty, if so, I have to put 0 in the field.
You may need a 2-step solution first of all in a client-side javascript in your text box Managing events will manage. This is not bulletproof, because any client-side behavior can be tricked / overridden. The next step will check / set the value presented in your controller code.
Comments
Post a Comment