taghelps with asp-if
grahamehorner opened this issue · comments
Grahame Horner commented
Please consider providing examples of using tag-helpers together with asp-if eg.
@{ var userName = "Elizabeth"; }
<partial name="_menuUserManagement" model="greetingName" asp-if="" />
Damian Edwards commented
Sorry, I'm not really following what you mean here. Do you mean something like this?
<partial name="_MyPartial" asp-if="SomeCondition" />
Grahame Horner commented
@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
Damian Edwards commented
I've confirmed they do work together. You'd just like to see an example that shows that?
Damian Edwards commented
I added an example at the end of the sample page.