Archive | AspNet RSS feed for this section

A Roslyn Web Script experiment

Out of frustration with the slow compile->deploy->result I look at other solutions from time to time. Recently I was hacking away with some server side javascript, which is cool. But I’m in a .Net world, coding C#. And I like to use the framework, libraries and language I’m used to. Because many web sites are […]

Read more

A require module pattern in Asp.Net Razor

Did you ever need to load modules dynamically in Razor? Do you like to write function libraries in pure Razor, and be able to use them from other files without placing that function libraries in App_Code, and without forcing the App to restart? Not? Oh, well, anyways – as a friday evening experiment I hacked […]

Read more

Using SignalR to build an Api (in Umbraco, WebMatrix or MVC)

I wrote a blog post the other day about using plain Razor scripts to create an easy to maintain Api on an Umbraco site. It’s a very straight forward way to make ajax-calls possible. However in reality I think many would say razor files is just not the right choice for server functionality like this, […]

Read more

Playing with EntityFramework Code First and “migrations” [5 minutes]

When EF 4 with CodeFirst came I was disappointed with the lack of automatic schema updates. Now a first version of “migrations” has arrived, which made me re-look at EF CodeFirst and make a small experiment – I was in a hurry and pretty sloppy, not reading anything more than briefly on this Scott Hanselman […]

Read more

Making the MVC3 Model independent of data source (using Ninject) [beginners]

Here are three “rules” I try to adopt to in my relearning MVC3 app: The Views should not do anything else than display the data. The Controllers should (on get’s) only be responsible for serving the right viewmodel to the right view for the particular request. The Models should not depend on one particular source […]

Read more

Adding a Razor View to our Hello World MVC3-app [beginners]

In my previous post I made an example of how to write a very light weight MVC3 app with only one file (well, besides the web.config and global.asax). In this post I’ll add a Razor view as simply as possible. The Razor view file requires us to add a little bit of structure to our […]

Read more

A one file Asp Net MVC3 Hello World app [beginners]

When I first started with MVC3 I got the impression that even the most simple application requires a lot of work (and a lot of files). That is not correct. MVC3 can also be used in a much lighter way than many of the tutorials show. Edit : check out the Really empty MVC3 template […]

Read more

The MvcMiniprofiler nuget in WebMatrix (WebPages) [5 minutes]

The MVC3-guys gets a lot of fun tools, but what about us that sometimes prefer WebPages for getting things done on the web? Mostly it’s cool since we’re on the same good solid Asp.Net platform. The MvcMiniProfiler for example. I just read Scott Hanselman’s introduction to it and wanted to try on a WebPages site. […]

Read more

5 min: WebMatrix + jQuery UI + json + jQuery templates

Lets use WebMatrix to create a very basic db – > ui sample using jQuery goodness. We’ll get from 0 to a working sample in five minutes (more or less). 1. The WebMatrix site First create a new site in WebMatrix using the Empty site template. 2. Database Next define a Sql CE database file, […]

Read more

WebMatrix MVC-ishness with Simple.Data and FormHelpers for CRUD

Building upon what I started with in my last post – a controller like cshtml page in WebMatrix – I have now added some functionality which means I have a basic, but working (demo state), generic CRUD workflow mimicing important parts of a regular Asp Net MVC 3 application. The code here is in an […]

Read more

Follow

Get every new post delivered to your Inbox.