asp.net core mvc - Create a Base TagHelper with no TargetElement -
i'm creating library of mvc6 taghelpers large project.
i find myself writing functionality in these taghelpers again , again.
i'd make base taghelper others inherit remove duplicated code.
the issue - suppose create base taghelper below:
public class basetaghelper : taghelper { public override void process(taghelpercontext context, taghelperoutput output) { //some implementation... } } now, when go write view, have intellisense suggesting taghelper <base>.
is there way can tell intellisense isn't taghelper want use, base class containing implementation common other taghelpers i've created?
create abstract class, see examples in official mvc core repo cachetaghelperbase
public abstract class basetaghelper : taghelper { public override void process(taghelpercontext context, taghelperoutput output) { //some base implementation... } }
Comments
Post a Comment