2012-04-14 33 views
1

我有一個場景,我需要使用javascript調用使用參數的操作方法並呈現由操作方法返回的視圖。我已經看到了一些例子,其中調用了操作方法,並更新了部分視圖。但我試圖執行操作方法和新視圖,可以這樣做嗎?請幫忙。謝謝調用操作方法並返回MVC3中使用Javascript的新視圖

function OnRowSelect(e) { 
     var form = $(this); 
     var taskInstanceUid = e.row.cells[13].innerHTML; 
     var so = e.row.cells[12].innerHTML; 
     var tabText; 
    $.ajax({ 
      type: 'POST', 
      cache: false 
     }) 
     .success(function (result) { 
       $.post("OrderInformation", { taskInstanceUid: taskInstanceUid }); 
     }); 

回答

1

如果你要更新整個視圖,難道你不能只是引導用戶到返回視圖的URL嗎?

<script type="text/javascript"> 
window.location.href = "http://yourdomain.com/controller/action/?parameter1=something"; 
</script 
+0

謝謝,它的工作。 :) – gurrawar 2012-04-18 22:02:07

相關問題