Beispiel #1
0
 /// <summary>
 /// Called when a view file is being processed, such as the main view file, partial views and layout views.
 /// </summary>
 /// <param name="viewVirtualPath">
 /// Root relative path to the view.
 /// </param>
 public static void InitializePage(string viewVirtualPath)
 {
     // Store the directory that the view file lives in
     HttpContextStore.AddAssetDirectory(new AssetPath(Path.GetDirectoryName(viewVirtualPath), HttpContext.Current.Server.MapPath));
 }