I was wondering if you could use Dependency Injection to initialize an Asp.net mvc taghelper. I’ll modify the example used in my previous post Creating a custom taghelper. Creating a service to inject public interface IPersonService { string GetName(); } public class PersonService : IPersonService { public String GetName() { return “PersonService.GetName()”; } } Register […]

Read More →

Taghelpers are new to Asp.net mvc 6. In this post i’ll show you how to create a custom taghelper. What is a taghelper? Basically taghelpers do the same thing as the htmlhelpers we all know. If you use a htmlhelper in your view, you’ll see that it is actually C# code. If you would use […]

Read More →