There is no ViewData item of type 'IEnumerable' that has the key “key”

前端 未结 2 889
别跟我提以往
别跟我提以往 2020-12-02 02:08

My code is like this

 namespace DiagnosisApp.Models
{
    public class ProcedurePrice
    {
        public int ID { get; set; }


        public int Departme         


        
2条回答
  •  悲&欢浪女
    2020-12-02 03:08

    I suppose you're missing something like

    ViewBag.ProcedureID = new SelectList(db.ProcedureCategory, "ID", "Name");
    

    I think you have to inizialize ViewBag.ProcedureId

提交回复
热议问题