0

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.

1 Answer 1

1

Instead of location.href, use top.href or parent.href

<tr onclick="top.href = '@(Url.Action("Show", "Messages", new { id = item.FriendID }))'">
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.