我们可以在控制器中使用Htmlhelper类吗?

时间:2014-06-30 08:52:11

标签: asp.net-mvc-4 asp.net-web-api

我正在开发web api项目,我们有一个htmlhelper类,我看到的声明如下:

 public static string GetCountryDomain(this System.Web.Mvc.HtmlHelper htmlHelper, Area area)
                     {
                         //body
                     }

我可以在api方法中使用helper类中声明的方法吗? 如果是,那么有人可以解释如何从我的控制器中调用该方法吗?

请考虑以下示例,其中调用从我的控制器在helper中声明的方法。

HtmlHelper.GetCountryDomain(area_id);

有人可以解释为了调用HtmlHelper类的上述方法需要传递的第一个参数吗?

0 个答案:

没有答案