0
Class Student {
String Name {get; set}
//Extended property of the student
School Shooling {get; set;}
}
public StudentControlelr()
{
public SchoolInfo (int? ID)
{
Student s = StudentRepository.GetStudentByID(id)
Return View ("Schooling/Index", s.Schooling);
}
}
for some reason i have to make this view as a shared view
// Views/Shared/schooling.ascx
Return View ("Schooling", s.Schooling);
这可行,但为什么不,如果它在不同的视图文件夹中不起作用?我在这里错过了一些东西吗?如何在不同的控制器中返回一个视图
请注意,ASP.net新手。
亲切的问候 维奈