I have a few questions.
I want to make my textbox readonly so I put [ReadOnly(true)] on my view model but the textbox does not have the readonly tag in it.
public class ViewModel()
{
[HiddenInput(DisplayValue = false)]
[ReadOnly(true)]
public int Id { get; set; }
}
in my razor page I got
@Html.EditorFor(x => x.Id)
I also noticed that when I use EditorFor it add classes like "text-box single-line". Is there away I can stop these from being generated or add my own class names to it?
Finally can you use a meta tag to tell the EditrFor to be empty instead of placing a value in it. Like in my cause it puts zero since that what the int holds. What if I just want it too look blank?