阅读背景:

如何在MVC.NET中的共享(静态)方法中生成URL?

来源:互联网 

I'm creating a Shared (static) method in ASP.NET MVC so it can be used by any controller in my project. This static method needs to generate a URL. I think I need to use System.Web.Mvc.UrlHelper, but I can't figure out how to call it from within a static method. The constructor seems to want a RequestContext. Any ideas?I'm creating a Shared (static) method in ASP.NE




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: