i create this custom actionlink
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);
}
i am try to call this method as
Helper.CustomActionLink(4,”myController”,”text”,”MyAction”)
but it asking me to pass first argument also ‘this HtmlHelper htmlHelper’ how i fix this
You should call it like this: