Skip to content

Instantly share code, notes, and snippets.

@pbering
Last active May 23, 2016 15:44
Show Gist options
  • Save pbering/09c927dce7439481ea1ffb2b86c36a41 to your computer and use it in GitHub Desktop.
Save pbering/09c927dce7439481ea1ffb2b86c36a41 to your computer and use it in GitHub Desktop.
which one
<!-- Classic Razor Html helper: -->
@await Html.Lightcore().PlaceholderAsync("menu")
<div class="page">
@await Html.Lightcore().PlaceholderAsync("content")
</div>
<p>@await Html.Lightcore.RenderField("title")</p>
@await Html.Lightcore.RenderField("text")
<!-- Or ASP.NET Core TagHelper: -->
<lc-placeholder name="menu" />
<div lc-placeholder="content" class="page"></div>
<p lc-field="title"></p>
<lc-field name="text" />
@magudb
Copy link

magudb commented May 23, 2016

I do like the Razor, i'm not sure i feel good about the tag-helpers yet.

@jballe
Copy link

jballe commented May 23, 2016

Well yes, we are used to razor so the tag-helpers seems a bit too migic right now but I guess that would change if the community in general go with tag-helpers - it is definitly shorter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment