I am trying to create a button that will open an email in the User's default email app. Know I can use mailto on the client side but this will not work for me because I need to pull information from the server to put in the email. This is what I have so far:
<input type="button" value="Forward Ticket" onclick="location.href='@Url.Action("Forward", "Ticket", new { ticketNumber = Model.TicketNumber, target = "_blank" })'" />
[HttpGet]
public ActionResult ForwardTicket(int ticketNumber)
{
}
I also know that I can send it completely from the server side - which I do in a lot of other cases. However, that will not work either because the user can forward it to as many people as they want and type in their own note.
As per CodeCasters I have converted to doing a mailto in a button:
<input type="button" value="Forward Ticket" /><a href="mailto:?subject=look at this ticket&body=You can view and respond to this ticket at https://helpdesk.stcusa.com/ChooseEditView?TicketNumber=@Model.TicketNumber"></a>
However, when I click it nothing happens.