Quantcast
Viewing all articles
Browse latest Browse all 7

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

For calling javascript in your action link you simply need to write actionlink like this:

@Html.ActionLink("Delete", "Your-Action", new { id = item.id },                 new { onclick="return confirm('Are you sure?');"})

Don't get confused between route values and the html attributes.


Viewing all articles
Browse latest Browse all 7

Trending Articles



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