私はこのカスタムアクションを作成しますlink
public static IHtmlString CustomActionLink(this HtmlHelper htmlHelper, int userId, string controller, string linkText, string action)
{
int userID = userId;
bool isAllowed = checkPermission(userID,action,controller);
if (isAllowed == false)
{
return MvcHtmlString.Empty;
}
return htmlHelper.ActionLink(linkText, action);
}
このメソッドを Helper.CustomActionLink(4,"myController","text","MyAction") として呼び出そうとしていますが、最初の引数も 'this HtmlHelper htmlHelper' に渡すように求められます。これを修正する方法