tag-helpers

Using the _ViewImports.cshtml File to Set Up View Namespaces in MVC 6

As of Beta 5 of ASP.NET 5, there is a new file in the Views folder of an MVC project called _ViewImports.cshtml (here's the GitHub item). In previous Beta versions, this file was called _GlobalImport.cshtml; even though it has been renamed, its functionality is the same in Beta 5 as in Beta 3. What exactly does it do? Let's find out! Purpose _ViewImports.cshtml serves one major purpose: to provide namespaces which can be used by all... Read more >

An Overview of Tag Helpers in ASP.NET Core

I was a little hesitant about the new Tag Helpers feature coming out with ASP.NET Core and ASP.NET MVC 6 when I last wrote about it, but a few recent updates have totally changed my mind. These things are going to be awesome. Are you still trying to understand what tag helpers are, and why we'd use them over good old Razor helpers? Then read on! Here's the sections in this tutorial: What's a Tag Helper? The Completed... Read more >

Tag Helpers in ASP.NET 5 Beta 3

NOTE: I have written a more updated tutorial on Tag Helpers. Check it out! I mentioned in Welcoming the Coming Death of WebForms that one of the features I was most excited about in ASP.NET 5 was Tag Helpers. I've finally gotten some time to install VS 2015 CTP 6 and try this feature out, and I'm pretty impressed by these early examples. Why use Tag Helpers? Because it gets us closer to the ideal webpage that's written only... Read more >
/* * * DON'T EDIT BELOW THIS LINE * * */ (function () { var s = document.createElement('script'); s.async = true; s.type = 'text/javascript'; s.src = '//' + disqus_shortname + '.disqus.com/count.js'; (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); }());