You cam mark the field on your data model class with“Editable(false)” attribute, thus this field will be read only
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
namespace FDLAMVC.Model
{
public class AppSetting
{
[Editable(false)]
public string Name { get; set; }
public string Value { get; set; }
}
}
Reference: