C# 获取包含c中版本信息的捆绑包的当前url#

C# 获取包含c中版本信息的捆绑包的当前url#,c#,asp.net,bundle,C#,Asp.net,Bundle,我正在尝试获取其中一个捆绑包的URL,其中包含C#中的版本信息。我试图解决的问题是,我们必须在另一台服务器上的iframe中托管一个页面,并且我们需要向它传递它应该显示的任何自定义CSS的URL。我知道bundle的基本url,但不知道如何获取要传递到该页面的版本信息 Styles.Url("~/css/someBundle").ToString(); //gets me the base url "/css/someBundle" in this case 我需要知道如何获取下面的部分?v

我正在尝试获取其中一个捆绑包的URL,其中包含C#中的版本信息。我试图解决的问题是,我们必须在另一台服务器上的iframe中托管一个页面,并且我们需要向它传递它应该显示的任何自定义CSS的URL。我知道bundle的基本url,但不知道如何获取要传递到该页面的版本信息

Styles.Url("~/css/someBundle").ToString();  //gets me the base url "/css/someBundle" in this case

我需要知道如何获取下面的部分?v={version information}

基于从
@Scripts.Render(name)
中查找定义,在Razor文件中,似乎还有一个
Url
方法:

public static class Scripts {
  [...]
  //
  // Summary:
  //     Returns a fingerprinted URL if the virtualPath is to a bundle, otherwise returns
  //     the resolve URL.
  //
  // Parameters:
  //   virtualPath:
  //     The virtual path.
  //
  // Returns:
  //     A System.Web.IHtmlString that represents the URL.
  public static IHtmlString Url(String virtualPath);
}
编辑:对其进行了快速测试:它确实返回了相对于站点根的路径,因此您需要转换为绝对URL