Home > Enterprise >  Get Content's Absolute Url in Razor Pages?
Get Content's Absolute Url in Razor Pages?

Time:09-29

Using Net Core 6 I have the following Page Model:

public class IndexModel : PageModel {

  public String AvatarUrl { get; set; }

  public IndexModel() { }

  public void OnGet() {

    AvatarUrl = Url.Content("~/avatar.jpg");

  }

}

How to get Absolute Content's Url instead?

CodePudding user response:

Inspired by enter image description here

enter image description here

  • Related