Questions tagged [view-components]

37 questions
0
votes
2 answers

How to check whether ViewComponent View exists?

Is there a way to check if a ViewComponent's View actually exists before trying to render it? I know there are FindView and GetView methods for searching Views from e.g. Controller, I'm looking for something similar for ViewComponents. Inside a…
Dely
  • 83
  • 3
  • 9
0
votes
2 answers

How can I use a Custom Channel of Action Cable with Stimulus Reflex and View Component?

So, I'm working on a project that should have a chat component same as the linkedin chat, where the user will have all their contacts and messages. But, I've tried of all ways to work with stimulus_reflex and view_component to create this chat_box,…
0
votes
1 answer

View Component in ASP.NET MVC 4

I can't find any examples for implementing a View Component in ASP.NET MVC Framework 4.5. I love to work with them in .NET Core, but it's really hard to find if they exist in ASP.NET MVC Framework 4.5.
user13821287
0
votes
1 answer

How to synchronize view component data with a partial view?

I want to display my .NET Core web page as per the below image. For the left pane, I am using a partial view whereas I'm rendering the right pane with view components. I call different API's to retrieve data from the database in order to display…
0
votes
0 answers

Integrating FluentValidation with ASP.NET Core 3.1 and view components

I just updated my application to .NET Core 3.1 and fluent validation to the latest version (8.6.2) and I am getting the following error when rendering view components, which have input fields. System.NullReferenceException: Object reference not set…
0
votes
1 answer

ASP.NET Core Razor Pages 2.2 - How to implement shared ViewComponent

I am working on ASP.NET Core web site using Razor Pages instead of MVC. I faced a situation where I have to implement a shared component which can be used in different pages. The component is - Simple comments thread. On different pages signed users…
-1
votes
2 answers

ASP.NET Core Dependency Injection error: Unable to resolve service for type while attempting to activate - Error is coming while calling viewcomponent

I am creating viewcomponents and below are my all code..but when I call this viewcomponent, I am getting error like below..so any one can help me to solve this as well as explain me what exactly issue is. The error is : InvalidOperationException:…
1 2
3