1

当我用于[AcceptVerbs(HttpVerbs.Post)]我的 Action Result 时,它显示错误

HTTP 404。您正在查找的资源(或其依赖项之一)可能已被删除、名称已更改或暂时不可用。请查看以下 URL 并确保其拼写正确。

当我删除[AcceptVerbs(HttpVerbs.Post)]时,它工作正常。为什么会这样?这段代码是

[AcceptVerbs( HttpVerbs.Post )]//will do action when we use Html.BeginForm()
public ActionResult GenerateReport( FormCollection fromCollection )//FormCollection:It provides to access  the values that were just posted to your page. 
{
    ReportInfo reportInfo = new ReportInfo();
    reportInfo.PatientId = "1111";
    reportInfo.PatientName = fromCollection.Get("patientName");
    reportInfo.PatientSex = "female";
    reportInfo.Findings=fromCollection.Get("Findings");
    reportInfo.History = fromCollection.Get("History"); 
    FillImageUrl( reportInfo, "PatientData.png" );
    return this.ViewPdf( "Radiology Report", "Index", reportInfo );

}

您能否建议解决此错误的解决方案

4

0 回答 0