Search code examples
asp.net-mvc-4mailto

How to perform "mailto" and controller action both in anchor tag (or @Hmtl.ActionLink)


I want the user to send email using their local email client, and the activity should be logged in the database. Means, I want to perform "mailto" and a controller action when user clicks on a link.

Can anyone help me to perform "mailto" and controller action both in anchor tag (or @Hmtl.ActionLink)?


Solution

  • You could have the link point to an MVC action that logs the activity and then returns a RedirectResult to a mailto: URL.