asp.mvc返回错误的视图

时间:2016-06-03 15:34:27

标签: c# asp.net asp.net-mvc razor

我有这样的代码:

public ActionResult Verification(string quarter, long employeeId)
{
    var consents = VerificationQueries.ClientsConsents(employeeId, CurrentSession, report.Quarter);
    var mifidsFund = VerificationQueries.ClientsMifidsFund(employeeId, CurrentSession, report.Quarter);
    var mifidsMak = VerificationQueries.ClientsMifidsMak(employeeId, CurrentSession, report.Quarter);

    var model = new VerificationViewModel(report, consents, mifidsFund, mifidsMak);
    if (quarter == "12016")
    {
        return View("Verification_12016", model);
    }
    else
    {
        return View("Verification", model);
    }
}

quater可以有2个值:“12016”和“22016”。 在调试器服务器中返回两个视图但浏览器总是呈现“Verification_12016”视图。 有什么问题?

编辑: 我更改了视图名称:“Verification_12016”和“Verification_22016”并且工作正常。但问题是什么,我不能“”验证“查看?

0 个答案:

没有答案