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

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -