Jatin Patel
Is there any to restrict user do not able change the some of model value in mvc?Please do not use read only css or like that.
By Jatin Patel in .NET on Dec 21 2016
  • Santosh Gadge
    Apr, 2017 19

    there are two way to have read only model properties. 1. using attribute [HiddenInput(displayValue="false")] - this attribute hide propertyin the model. when template scaffolding used to create CRUD based views then hidden property not visible in a view. 2. using attribute[ReadOnly(true)] - this attribute is an safest way to make property as read only and its value does not change though we have assign an value to property.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS