PageBaseExtensions Class
Definition
- Namespace
- Cuemon.Extensions.AspNetCore.Mvc.RazorPages
- Assemblies
- Cuemon.Extensions.AspNetCore.Mvc.RazorPages.dll
Extension methods for the PageBase class.
public static class PageBaseExtensions
- Inheritance
-
PageBaseExtensions
Examples
The following example demonstrates how to resolve application-base URLs and CDN URLs for static resources from a Razor Page model.
using Cuemon.Extensions.AspNetCore.Mvc.RazorPages;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace MyApp.Examples;
public class PageBaseExtensionsExample
{
public void Demonstrate(PageBase pageModel)
{
string appScript = pageModel.GetAppUrl("js/site.js");
string cdnImage = pageModel.GetCdnUrl("images/logo.png");
}
}
Methods
| Name | Description |
|---|---|
| GetAppUrl(PageBase, string) | Gets the fully qualified URL for a static resource of your application. |
| GetCdnUrl(PageBase, string) | Gets the fully qualified URL for a static resource placed outside your application (typical CDN). |