I have a model which I have binded with a view having text boxes. Now their are certain text boxes which i want to make read only and that to from the model class.
So any suggestions how can i make them read only from the model class.
I have a model which I have binded with a view having text boxes.
Share
Here is the answer:
the View is something like
My ViewModel is:
And the custom Metadata property is like:
And now finally you should add the partial view (String.cshtml) in EditorTemplate folder like:
Thats all.
Enjoy.