Jon Galloway
-
Using CodeMirror to add C# syntax highlighting to an editable HTML Textarea
I wanted to display some C# code in an html <textarea> control that was displayed in an ASP MVC 3 application using @Html.TextArea():
-
Getting Mono compiler output in a web application using StreamReportPrinter
I've been continuing my experiment with Mono's compiler as a service in an ASP.NET MVC application and making pretty good progress. One of the difficulties I ran into along the way was in troubleshooting compiler errors when I'd deployed the application. Almost all of the content and documentation on Mono.CSharp is in a console application / REPL scenario, which doesn't help in tracking down errors in a web application.
-
C# and VB.NET - Differing namespace conventions
Recently, while reviewing the VB.NET translation of the MVC Music Store tutorial, I noticed that none of the controllers / models / classes in general have namespaces. I was going to blow up on the person who did the translation like a bad FxCop, but I fired up a new MVC 3 / VB.NET app and saw the project template doesn't use namespaces, and that the New Controller wizard doesn't use a namespace, etc. After checking with the ASP.NET team, I decided to post the VB.NET source code without explicit namespaces in each class, because that's how the code would look if you followed the steps in the tutorial.
-
Dynamic ASP.NET MVC 3 models using Mono’s Compiler as a Service
I had an idea for an interactive MVC sample which will let you see the scaffolded editor and display for a model. I thought about a few ways to do this, the first being Mono’s compiler as a service. So far it’s a partial success – the model scaffolding works, but the attributes don’t (very possibly my mistake).
-
Tips for avoiding e-mail disasters
There's something about hitting the send button on an e-mail that remind me of some important detail, such as:
-
Copying Windows Live Writer accounts to another computer
I'm setting up a new laptop and needed to copy my Windows Live Writer accounts over. I've run through the Writer "add a blog" wizard so many times over the years and always wondered if there were a less tedious way to add all my blog settings at once. I first looked at an Import and Export Wizard for Windows Live Writer program, but it didn't seem to work. It turns out that it's pretty simple to do this manually using a registry file.
-
MVC Music Store Updates - MVC 3 Tools Update Features, Scaffolding, Save Points, VB.NET Code
The latest drop of the Mvc Music Store tutorial cover the ASP.NET MVC 3 Tools Update, Scaffolding, Entity Framework Code First, SQL Server CE, and more. Additionally, this drop includes a VB.NET translation of the finished project as well as save points how the code should look when you complete each section.
-
Looking at how the ASP.NET MVC Authorize interacts with ASP.NET Forms Authorization
ASP.NET MVC includes an [Authorize] attribute, which when placed on any controller actions will forbid unauthorized access. The AuthorizeAttribute allows you to specify a list of roles or users, like this: