Open JuergenGutsch opened 5 years ago
Comment written by Vishal Thaker on 23.03.2018 14:31:45
How do you handle events within viewcomponent? In my case if I have a dropdown and I need to have a on change event or a button click event to do something...how do I do it?
Comment written by Jürgen Gutsch on 27.03.2018 07:19:15
Hi,
In ASP.NET MVC there are now such things like events in the page life-cycle.
If you interact with form elements you usually do an form post and react in the post action on the passed values.
This is the common ASP.NET MVC way, independent from .NET Core or .NET Framework and independent from ViewComponents or regular Views:
https://docs.microsoft.com/...
i cant use view component in my mvc project. error: the namespace name "viewcomonent" not found
I think I need some more information to help you. Currently It looks like a typo:
Should be ViewComponent
instead of viewcomonent
Written on 30.11.2015 08:02:41
URL: http://asp.net-hacker.rocks/2015/11/25/viewcomponents-aspnet5.html