Something I Learned This Week: Vue.js in ASP.NET Core MVC

It sounds a little weird, but it’s actually really cool…

Mike Wolfe
CodeX

--

Photo by Pankaj Patel on Unsplash

Late last week, I was chatting with my boss about a project he was working on. Omitting some details, the requirement of this project was to add a new page to an ASP.NET MVC web application. It sounded like a normal new page addition, except that instead of using the built-in Razor functionality on the view, he was instead, leveraging the power of Vue.js. Never having realized this was even possible, after work and after a little research, I immediately started implementing Vue.js in one of my personal projects. Let’s take a look at what I had to do to get this working.

Writing Some Code

Before getting down into the weeds, it’s important that I give you a little background about the project. In a nutshell, the app that I will be modifying today has two lists and a video media player. The first list displays a list of directories where each directory is actually a button. When clicked, the second list will display a list of video files within that directory. These files are also buttons that when clicked, will make them playable in the media player.

Now that we can finally get our feet wet and show you what I did, the first thing to do is to remove most of the old…

--

--

Mike Wolfe
CodeX
Writer for

Software Developer, Tech Enthusiast, Runner. Current project http://sqlcheater.com/ Connect with me on LinkedIn: www.linkedin.com/in/michael-wolfe-176212125