toddams/RazorLight

UrlHelper access

cadilhac opened this issue · 2 comments

Using asp.net core 6.

Is it possible to access a UrlHelper in a template so that I can generate a url? Intellisense recognizes @Url.RouteUrl(... but I get an exception at runtime: The name 'Url' does not exist in the current context.
I tried adding @using Microsoft.AspNetCore.Mvc but it does not help.
Thanks

I had searched the exact same results you show me. And I read at that time "Work on UrlHelpers is in progress, expect in a nearest release". It was a long time ago and there was new releases since then. So I thought it was relevant to ask again. Seems this is not implemented if I understand correctly.