컨트롤러에 간단한 문자열 (xml)을 보내려고합니다. 왜 Visual Studio의 중단 점이 맞지 않는지 모르겠습니다. 내가 콘솔에서 단지 500 오류가Ajax 및 MVC 4 (요청 후)
[HttpPost]
public ActionResult show(string xml)
{
try
{
ViewBag.xml = xml;
return PartialView("showXML");
}
catch (Exception)
{
return Content("error");
}
}
: 여기
$.ajax({
type: "POST",
url: "BasicWizard/show",
data: "xml="+xmlResult,
success: function (data) {
console.log("Oh yeah !");
},
error: function(jqXHR, textStatus, errorThrown) {
console.log(textStatus, errorThrown);
}
});
그리고 컨트롤러 내 방법은 다음과 같습니다
다음은 jQuery 코드입니다.
방화 광/콘솔에 오류가 있습니까? –
컨트롤러 방법은 어떻게 생겼습니까? –
POST : http : // localhost : 2424/BasicWizard/show 500 (내부 서버 오류) jquery.min.js : 130 오류가 정의되지 않았습니다. – Yopp88