ASP.Net [HiddenInput] Data Attribute not working when rendered with Html.EditorForModel in Razor?

后端 未结 6 566
情歌与酒
情歌与酒 2021-01-11 18:01

I have the following model:

public class Product
{
    [HiddenInput(DisplayValue = false)]
    public int ProductID { get; set; }

    [Required(ErrorMessage         


        
6条回答
  •  时光说笑
    2021-01-11 18:32

    I too had this issue. The issue was occurring due to different versions of System.Web.Mvc in different projects of the same solution. I removed and added the references again so that it is same for all the projects(4.0.0.1).

提交回复
热议问题