How to use MVC 3 @Html.ActionLink inside c# code

前端 未结 5 1093
庸人自扰
庸人自扰 2021-01-17 09:59

I want to call the @Html.ActionLink method inside a c# function to return a string with a link on it.

Something like this:

string a = \"Email is lock         


        
5条回答
  •  我在风中等你
    2021-01-17 10:19

    Maybe try this:

    string a = "Email is locked, click " + System.Web.Mvc.Html.LinkExtensions.ActionLink("here to unlock.", "unlock");
    

提交回复
热议问题