4
我通过一个普通的HTML文本文件发布c:\
驱动器上到我的MVC的网站在我的机器上运行:MVC从其他网站接收后 - 铬说后取消
<body>
<a id="testPost" href="./post_files/post.htm">test post</a>
<script type="text/javascript">
$("#testPost").click(function() {
$.post("http://hml.backend/Helix/Authorisation",
{
ClientIP: "192.168.20.34"
}, function (resultData) {
alert(resultData);
});
return false;
});
控制器设置如下:
[HttpPost]
public ActionResult Authorisation(string ClientIP)
{
string result = _videoSecurityService.CheckHelixAuthorisation(ClientIP);
return Content(result);
}
控制器事件被击中在调试并没有什么异常,但Chrome的说
:在调试窗口
任何想法,为什么“POST取消”?
谢谢,我认为就是这样。我现在已经用一个windows窗体应用程序测试了这个帖子,代码来自:[link] http://msdn.microsoft.com/en-us/library/debx8sh9.aspx?cs-save-lang=1&cs-lang= CSHARP#代码片段 - 27 – user1444886