Hi Team
I have two models and want to bind them one single view, somehow i am struggling to achieve this. Let me share my logic below;
public class ApplicationName
{
public int PNR { get; set; }
public string FIS { get; set; }
public string Telegrams { get; set; }
public string Transaction_Code { get; set; }
public string TS_Logs { get; set; }
public string Readers_Logs { get; set; }
public List
}
public class SystemApplication
{
public int SystemID { get; set; }
public string Optimo { get; set; }
public string RACS { get; set; }
public string Stacker_Cranes { get; set; }
public string BIW_Services { get; set; }
public string IP_Services { get; set; }
public string KP_Services { get; set; }
public List
}
@using CheckTimeLine.Models
@model CheckTimeLine.Models.ApplicationName
@{
ViewBag.Title = "Home Page";
}
Sachin SinghPosted Nov 2, 2021, 10:11 AM
Srinivasan RamamoorthiPosted Nov 2, 2021, 12:21 PM
Guest UserPosted Nov 2, 2021, 10:17 AM
The error is gone, but i can only access one model. while my select option does not have access now to System application model and its complaining.
The model item passed into the dictionary is of type 'CheckTimeLine.Models.SystemApplication', but this dictionary requires a model item of type 'CheckTimeLine.Models.ApplicationName'.
@using CheckTimeLine.Models
@model ApplicationName
@{
ViewBag.Title = "Home Page";
}
Select Below @foreach (var Data in Model.NameDrops) // Its outside scope and need to have it on my model {@Data.SystemName }
Guest UserPosted Nov 2, 2021, 10:04 AM
Sachin SinghPosted Nov 2, 2021, 9:53 AM