3

我想在关闭对话框时刷新页面?这可能吗?我怎样才能做到这一点?有一些链接可以打开它们自己的对话框。但是当我第一次点击任何链接时,对话框缓存它的 id,然后我点击其他链接 id 总是相同的(第一次点击 id)。

关闭对话框时我应该刷新页面还是有其他方法可以解决此问题。

我使用下面的代码打开对话框:

@foreach (var item in Model)
{
   <tr>
       <td>@Html.ActionLink(linkText: item.musteri_adi,
           actionName: "MusteriDuzenle",
           controllerName: "Musteri",
           routeValues: new { sno = item.sno },
           htmlAttributes: new { @class = "open_dialog", data_dialog_title = item.musteri_adi })
       </td>
       <td>@Html.DisplayFor(x => item.fatura_adresi)
       </td>
   </tr>
}

谢谢。对不起我糟糕的英语:)

4

1 回答 1

4

您可以使用beforeClose事件来调用函数来刷新您的页面。

$( "#myDialog" ).dialog({
   beforeClose: function(event, ui) {
      window.location.reload(); 
      // or you can use window.location = 'mypage.html';
}
});
于 2012-07-10T14:25:11.597 回答