2012-05-13 169 views
0

我頁有按鈕,顯示iframe中,其中小單可點擊行是這樣的:asp.net MVC 3剃鬚刀和HTML IFRAME

<tr onclick="location.href = '@(Url.Action("Show", "Messages", new { id = item.FriendID }))'"> 

所以我的問題是,當在TR上重定向用戶點擊工作但在我框架我想重定向我的父頁面。

回答

1

相反location.href的,使用top.href或parent.href

<tr onclick="top.href = '@(Url.Action("Show", "Messages", new { id = item.FriendID }))'">