Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc asp.net mvc 3 razor和html iframe_Asp.net Mvc_Asp.net Mvc 3_Iframe_Razor - Fatal编程技术网

Asp.net mvc asp.net mvc 3 razor和html iframe

Asp.net mvc asp.net mvc 3 razor和html iframe,asp.net-mvc,asp.net-mvc-3,iframe,razor,Asp.net Mvc,Asp.net Mvc 3,Iframe,Razor,我有一个页面,有一个按钮显示iframe,其中有一个小列表,可点击的行如下: <tr onclick="location.href = '@(Url.Action("Show", "Messages", new { id = item.FriendID }))'"> 因此,我的问题是,当用户单击tr Redirect时,我想在i框架上重定向我的父页面。而不是location.href,使用top.href或parent.href <tr onclick="top.href

我有一个页面,有一个按钮显示iframe,其中有一个小列表,可点击的行如下:

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


因此,我的问题是,当用户单击tr Redirect时,我想在i框架上重定向我的父页面。

而不是location.href,使用top.href或parent.href

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