How to trigger window.open by Html.Actionlink in ASP.NET MVC 4
<p>I have a code block as follows:</p>

<pre><code>@foreach (System.Data.DataRow drEquipment in Model.EquipmentList.Rows)
    {
         &lt;tr&gt;
             &lt;td valign="top"&gt;@drEquipment["ColumnName"]&lt;br /&gt;&lt;/td&gt;
             &lt;td valign="top"&gt;@drEquipment["ColumnName"] - @drEquipment["ColumnName"]&lt;br /&gt;&lt;/td&gt;
             &lt;td valign="top"&gt;@drEquipment["ColumnName"]&lt;/td&gt;
             &lt;td valign="top"&gt;@drEquipment["ColumnName"] - @drEquipment["ColumnName"]&lt;/td&gt;
             &lt;td&gt;@Html.ActionLink("Güncelle", "UpdateAction", new { SerialNumber = drEquipment["ColumnName"], StockSpecCd = drEquipment["ColumnName"], ResourceSpecTypeCd = drEquipment["ColumnName"] }, new { popup="{\"height\":250, \"width\":350}" })&lt;/td&gt;  
         &lt;/tr&gt;
    }
@Html.ActionLink("Update", "UpdateAction", new { SerialNumber = drEquipment["ColumnName"], StockSpecCd = drEquipment["ColumnName"], ResourceSpecTypeCd = drEquipment["ColumnName"], new { popup="{\"height\":250, \"width\":350}" })
</code></pre>

<p>It is working well like this but I couldn't site popup center of the screen. That's why I have an onclick event as follows:</p>

<pre><code>onclick="MyPopup('/Account/UpdateAction', '350', '250')"
</code></pre>

<p>So I couldn't use a variable like id to use e.preventDefault because there is a foreach statement. </p>

<p>I solve this problem on button click event and it works well: </p>

<pre><code>&lt;button onclick="MyPopup('/Account/UpdateAction', '350', '250')"&gt;Update&lt;/button&gt;

function MyPopup(url, width, height) {
var leftPosition, topPosition;
//Allow for borders.
leftPosition = (window.screen.width / 2) - ((width / 2) + 10);
//Allow for title and status bars.
topPosition = (window.screen.height / 2) - ((height / 2) + 50);
//Open the window.
window.open(url, "_blank",
"status=no,height=" + height + ",width=" + width + ",resizable=yes,left="
+ leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY="
+ topPosition + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no");
</code></pre>

<p>}</p>

<p>But I couldn't use my function with Html.Actionlink. I put an onclick event as an htmlAttritube but it didn't work. </p>

<p>What I exactly need is pass my parameters to controller and open new _blank window "site center of the screen". I have all my needs without last one.</p>

<p>How do I fix this problem?</p>