the controller code looks like
public class EmployeeController : Controller
{
public enum EmployeeType
{
RecruitmentOffice,
ResearchInstitute
}
public ActionResult Details(int id, EmployeeType type)
{
switch (type)
{
case EmployeeType.RecruitmentOffice:
// load repository
// load domain object
// load view specific to recruitment office
break;
case EmployeeType.ResearchInstitute:
// load repository
// load domain object
// load view specific to recruitment office
break;
}
}
}
now i want that how to generate form action method
which will point to Details
action method and pass the enum value like EmployeeType.RecruitmentOffice or EmployeeType.ResearchInstitute
and again when i will call that action method by jquery
then how could i pass parameter for id & EmployeeType
.
please discuss with sample code. thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…