DamianEdwards / TagHelperPack

A set of useful, and possibly opinionated, Tag Helpers for ASP.NET Core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

taghelps with asp-if

grahamehorner opened this issue · comments

Please consider providing examples of using tag-helpers together with asp-if eg.

@{ var userName = "Elizabeth"; }
 <partial name="_menuUserManagement" model="greetingName" asp-if="" />

Sorry, I'm not really following what you mean here. Do you mean something like this?

<partial name="_MyPartial" asp-if="SomeCondition" />

@DamianEdwards sorry, yes; I should try and give better examples/explanation I was thinking around using partial as a work-around for the limitation of @section so when a condition is met the partial is injected and or the partial tag could also have asp-require=true|false again similar to section

I've confirmed they do work together. You'd just like to see an example that shows that?

I added an example at the end of the sample page.