我想在fileupload操作後顯示jquery彈出窗口?不知道如何編碼?文件上傳後調用jquery腳本完成asp.net mvc 2
<%= Html.BeginForm("Upload","Home",FormMethod.Post,new { enctype = "multipart/form-data" }) %>
<%{ %>
<input type="file" id="upload" name="upload" />
<button id="btnUpload">
upload</button>
<%} %>
<script type="text/javascript">
function SayFinished() {
alert('Finished');
}
</script>
[HttpPost]
public ActionResult Upload()
{
HttpPostedFileBase selectedFile = Request.Files["upload"];
if (selectedFile.ContentLength > 0)
{
//do some processing call jquery script to open popup: SayFinished()
}
return View("Index");
}
我想留在同一頁上? – user603007 2011-05-09 00:12:05
請參閱上面的相同頁面解決方案。 – Gats 2011-05-09 02:40:20