Quantcast
Channel: User mykhailovskyi - Stack Overflow
Viewing all articles
Browse latest Browse all 29

Answer by mykhailovskyi for Html.ActionLink onclick JavaScript function is not invoked and name of function is corrupted in output HTML

$
0
0

You add onclick handler in wrong place. You must put it in Html Attributes block instead Route values. Try it:

<p>@Html.ActionLink("Call number", "Call", new { id = Model.Id, number = Model.CellNumber }, new { @class = "btn btn-default", onclick = "alert('a');" })</p>

Viewing all articles
Browse latest Browse all 29

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>