Reputation: 34198
I have page there is button which shows iframe where is small list with clickable rows like this:
<tr onclick="location.href = '@(Url.Action("Show", "Messages", new { id = item.FriendID }))'">
So my problem is when user click on tr Redirect is working but on i frame i want to redirect my parent page.
Upvotes: 0
Views: 1414
Reputation: 3806
Instead of location.href, use top.href or parent.href
<tr onclick="top.href = '@(Url.Action("Show", "Messages", new { id = item.FriendID }))'">
Upvotes: 1