asp.net-core-viewcomponent Questions
1
Solved
I am trying to move controller logic into a view component class, but the controller only returns JSON, for a client side widget that is the UI of my view component. This is the core controller cod...
Italianism asked 9/10, 2017 at 6:10
3
Solved
In an ASP.NET Core app I want to return custom html from a ViewComponent. I can return custom text, but the html will be encoded instead of being embedded:
public class BannerViewComponent : ViewC...
Unavoidable asked 1/2, 2017 at 14:40
3
Solved
I Use a ViewComponent for render sidebar in some page. I need current login User for some action, how can get User in ViewComponent? Of course I can pass as a parameter from view to InvokeAsync met...
Developer asked 21/9, 2016 at 11:49
1
I'm in the process of getting to grips with ASPNET CORE [version 1.1, using VS2017 Community, version 15.1 (26403.3)]I've created a working ViewComponent called UserDetails (abbreviated below):
na...
Juniejunieta asked 5/5, 2017 at 8:23
2
Solved
I have two ViewComponent and i want use ViewData or other technic for share some data between and then use this data in main view, but this is not the way, and ViewData per ViewComponent is null wh...
Surrounding asked 7/5, 2017 at 6:47
1
Solved
In the following method I'm getting the warning: This async method lacks 'await' operators and will run synchronously. Where can I use await in this mehod? Note: This method is returning a simple s...
Hartfield asked 12/10, 2016 at 20:22
1
Solved
I am trying to use the ViewComponents.InvokeAsync() feature, but somehow this is not async at all. It is waiting for the component code to render.
http://docs.asp.net/en/latest/mvc/views/view-compo...
Euterpe asked 16/3, 2016 at 0:27
2
Solved
I want to add ListItems from a form in a ViewComponent in an ASP.NET 5, Mvc core application.
The component view (Views\Shared\Components\AddListItem\Default.cshtml):
@model ShoppingList.Models.L...
Humidor asked 14/2, 2016 at 23:26
1
Solved
I'm getting used to view components in MVC 6, and I asked a similar question a few years ago about partial views. If I build a view component encapsulating a common use-case that requires its own J...
Balmy asked 21/1, 2016 at 19:31
1
Solved
I am playing around with MVC 6 and have a grid of Users that are currently registered to my site. Above the gird, I have built a View Component for the search/filter functionality. It is invoked vi...
Lamppost asked 6/1, 2016 at 17:44
1
Solved
I have a viewcomponent that contains some reusable business logic that embed in various pages. This has been working fine. However, I now have a requirement to refresh the viewcomponent using ajax....
Salvatoresalvay asked 16/9, 2015 at 21:9
© 2022 - 2024 — McMap. All rights reserved.