我是 MVC 的新手,我想将我的下拉列表值传递给其他视图。我有两个类 Patient 和 History,如何将患者姓名(带有下拉列表)传递给 History's View,当我选择任何 Patient 时,它会显示 Patient's history。
public class Patient
{
public List<Patient> ListOfPatient { get; set; }
public SelectList ListOfPatient1 { get; set; }
public int Id_pacient { get; set; }
public string Name { get; set; }
//... other properties
}
public class History
{
public List<History> ListOfHistory { get; set; }
public int Id_history { get; set; }
public int Id_patient { get; set; }
//... other properties
}