2012-03-08 53 views
-1

完成Ajax.actionlink调用后如何显示弹出消息,我有以下ajax.actionlink: -在myasp.net MVC应用程序

@Ajax.ActionLink("Delete", "Delete", "Answer", 
     new { id = answer.AnswersID }, 
      new AjaxOptions 
      { 
       Confirm = "Are You sure You want to delete this Answer ?", 
       HttpMethod = "Post", 
       UpdateTargetId = @answer.AnswersID.ToString(), 
       OnSuccess = "removePartial2", 
      }) 

目前如果调用成功,它会调用removePartial2 Java脚本,,,但我怎么能成功完成“删除成功”的通话后显示确认消息?

回答

1

你可以做的是,在removePartial2功能:

function removePartial2(result) { 
    alert('Deletion was successful'); 
} 
+0

我想这一点,它的工作原理以及在Internet Explorer,但它没有在Firefox上运行,,, – 2012-03-08 21:34:37