This is post 1 of 11 in the series “Azure for Developers” I recently had the privilege to take a week of training on Windows Azure. I learned a lot and had fun while doing so. The parts that interested me the most were the parts that played well to my own strengths, which are in software development, as opposed to the other parts that focused on the infrastructure aspects of Azure. When I started looking around for blogs about Azure, I would find a lot of content that focused on the latter, but not very many that addressed the…
So you need to download a file to the browser with ASP.NET MVC? Let’s take a look at a simple example, starting with the Controller’s Action method. Controller Code System.Web.Mvc provides a few different types of FileResult (which derives from ActionResult): FileContentResult, FilePathResult, and FileStreamResult. However, since they all derive from FileResult, we can simply use FileResult as our return type.
public FileResult DownloadWidgetDataFile(long widgetId)
using (var mem = new MemoryStream())
// Create spreadsheet based on widgetId...
// Or get the path for a file on the server...
return File(mem, "application/vnd.ms-excel", "WidgetData.xlsx");
In this example, we are using an ID to look up some sort of data and create a MemoryStream that contains the file contents. If the data already exists as a file on the server’s file system, you would only…
Now it’s time to build the Fiction page. Hmmm, it is just like the Book page but with a different title (and of course, a subset of the books). We could copy and paste the XAML into the Fiction page. But then the NonFiction page is very similar to the Fiction page ,as is the Biographies pages. In each case, as far as the view is concerned, all we want to do is change the title. We could implement this by copy and paste, but “clipboard-inheritance” makes me itch.
Much like the perfect union of peanut butter and jelly, some development tools — like Microsoft SharePoint and Telerik Sitefinity CMS — are a match made in heaven. The perfect complement of functionality between Sitefinity and SharePoint allows you to make sure your project is flawless. In this webinar, Falafel’s CEO Lino Tadros and Telerik’s Director of Sitefinity Product Marketing Robert Mattson will share the pros and cons of the two solutions and how they can work for you and your project. Webinar: Microsoft SharePoint and Telerik Sitefinity: The Right Tool. The Right Job. Date: February 25, 2015 Time: 11am…
One of the things we pride ourselves on at Falafel is the outstanding training we offer to our customers. Whether you’re looking at implementing a new tool and need to learn how to use it, want to brush up on industry best practices, or learn a new skill we can help you out. There are a lot of benefits of attending software training (for both you and your company), but identifying all of the benefits and articulating that ROI to your manager can be challenging. Today our awesome partner, SmartBear, published a guest post from us that covers exactly that.
Earlier this year, I delivered a 5-day online workshop to a customer’s team on software craftsmanship. The class went really well and I thought the format worked out, even though typically this kind of class is done in-person. We basically did four hours of instruction per day, with an hour break in the middle for lunch. There was some hands-on during this time, but most of the hands-on material was left for students to do on their own time as labs. We don’t go more than 4 hours per day with remote training because it’s tough to keep the attention…
This is post 1 of 3 in the series “Hands-free WinRT” In Star Trek, characters routinely talk to the ship’s computer and it talks back. This feels very natural to the viewer, because the computer is just another character in the story. However, when given the opportunity to talk to my own computer today, I still feel awkward and prefer not to… especially if other people are within earshot! The exception to this is when I’m driving. My Lumia Windows Phone integrates nicely with my car’s Bluetooth, so as text messages arrive, I can have them read aloud and even reply…
I’ve been attending Codemash since its inception. The conference occurs in early January and has always provided me with enough topics that I want to investigate to fuel and motivate me for the entire year. Codemash casts such a wide net of topics and technology that there is always something for everybody. Here are some of my highlights: Holiday Light Fight I really love tinkering with sensors, lights, microcontroller boards and System on a Chip boards (SOC). It didn’t take me long to sign up for the Holiday Light Fight pre-compiler session at Codemash. I’ve always wanted to figure out…