Quantcast
Viewing all articles
Browse latest Browse all 7

Answer by Katsifaris for how to call javascript function in html.actionlink in asp.net mvc?

This is the only one that worked for me in .cshtml file:

@Html.ActionLink("Name", "Action", "Controller",    routeValues: null,    htmlAttributes:new Dictionary<string, object> {{ "onclick", "alert('Test');" }})

I hope this helps.


Viewing all articles
Browse latest Browse all 7

Trending Articles



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