none
How to execute action and controller from class file? RRS feed

  • Question

  • Dear All,

    I am stuck on one requirement where i need to call controller and action from email. When user will click one link from that email, relevant logic should work. Below is the code. But it is giving error like "Input string was not in correct format....."

    Code:

    string WorkflowLink = string.Format(CultureInfo.InvariantCulture, "You can <a href='{@Url.Action(ControllerName, ActionName)}'>Approve</a> this work here.");

    Is there any way to achieve this.

    Thank you.

    • Moved by CoolDadTx Thursday, May 24, 2018 1:58 PM ASP.NET related
    Thursday, May 24, 2018 11:44 AM

All replies

  • No, you can't make the call to a controller from an email using Razor ActionLink that I know about.

    https://forums.asp.net/1146.aspx/1?MVC

    The above is where you can post.

    Thursday, May 24, 2018 1:44 PM