I have a requirement like @Html.TextBoxFor
to show the currency in a comma seperated format, without accepting negative values and without special characters. At the same time when the currency is not available, I'm changing the value of this TextBoxFor to 'not available'. How this can be achieved in the View, using decimal validation and supporting text input?
@Html.TextBoxFor(m => m.SourceCurrencyValue, new { @Value=String.Format("{ViewBag.decimalplace}",Model.SourceCurrencyValue) })
ViewBag.decimalplace
should be the decimal position like 2 or 3.