-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add ViewComponentResult helper methods to Page \ PageModel #7051
Comments
ViewComponent
in Razor Pages
@pushqrdx @rynowak \ @DamianEdwards were the ViewComponent family of helpers also intentionally not ported over or did we just miss porting them? |
@pranavkm You saved me, is there any reason it isn't there ? |
@pushqrdx returning view components from a handler isn't a pattern we expect users to commonly use in a page-focused workflow. One of my suggestions from the earlier comment or perhaps a couple of extension methods should do the trick in your case. |
@pranavkm, can you please handle this? |
@mkArtakMSFT we specifically chose not to port the helper over - see #5846. Is the plan to port them? |
In the underlying
PageModel
i want to return a ViewComponent from a OnGet request. I am trying return ViewComponent("ComponentName"); but it throws an errornon-invocable member ViewComponent
The text was updated successfully, but these errors were encountered: