Kenny Tordeur

Random thoughts about Asp.Net MVC

  • Home
Kenny Tordeur-Banner

Author: Kenny Tordeur

Mar09 0

Multiple submit buttons on an Asp.net MVC view

Posted by Kenny Tordeur

Multiple submit buttons When you create a view in ASP.NET MVC, you’ll probably have 2 methods for that view in your controller. A GET method and a POST method that will accept your form data. This POST method will do some sort of action. Now sometimes you wish, that you could put 2 submit buttons […]

Read More →
ASP.NET MVC submit
Jul11 0

ASP.NET 5: Routing constraints and custom constraints

Posted by Kenny Tordeur

In ASP.NET 5 the routing system has been unified and it is build as a middleware component that easily can be plugged in. This routing system can be found in the “Microsoft.AspNet.Routing” Nuget Package or add github if you want to work with the source code. Adding routing Constraints Here is an example how we […]

Read More →
ASP.NET MVC routing
Jul02 0

ASP.NET 5: Managing dependencies using the project.json file

Posted by Kenny Tordeur

In ASP.NET 5 your dependencies, configurations aren’t configured in the .csproj file like before. They added a project.json file where all this is done. This file is a simple JSON file that is much more readable than the .csproj file. Adding Dependencies Dependencies are defined using a name and version. And Visual Studio provides full […]

Read More →
ASP.NET project json file, dependencies
Jan24 0

Asp.net MVC: The correct way to render a partialview

Posted by Kenny Tordeur

When you create an Asp.net mvc application will create partial views in order to use them as “user controls” throughout your application. But you have to use them with caution. These are my viewmodels. public class ParentViewModel { public string Description { get; set; } public ChildViewModel Child { get; set; } public ParentViewModel() { […]

Read More →
ASP.NET MVC partial view
Jan08 0

Navigation in a Single page Web application: Sammy.js

Posted by Kenny Tordeur

Single page Web applications are becoming more and more frequent. There are a lot of frameworks/technologies that make the development of these applications a lot easier. You can use JQuery to manipulate your page, use Knockout.js to work the ViewModel way and use WebApi to get your data. All these tools make a fine toolbox […]

Read More →
Javascript navigation, single page application
Dec12 0

Asp.net MVC MEF: Per Request Lifetime

Posted by Kenny Tordeur

Like the title says, i want to use MEF in an Asp.Net MVC application and the lifetime of the object has to be exactly the same as the lifetime of the request. In short, i want 1 single unique object that is recreated per request. In MEF there is a way to control the lifetime […]

Read More →
ASP.NET MVC dependency injection, mef
Aug31 1

Using MEF in Asp.Net MVC 4 and WebApi

Posted by Kenny Tordeur

MEF stands for “Microsoft Extensibility Framework”. If you want an overview of MEF, you can look here. In this post we will integrated MEF with Asp.Net MVC 4 and with the WebApi. Asp.Net MVC 4 First of all you need to reference the “System.ComponentModel.Composition.dll” assembly which contains the implementation of MEF. Now where are going […]

Read More →
ASP.NET MVC dependency injection, mef, webapi

Post navigation

  • Newer posts →

Recent Posts

  • Session state in Asp.net Core
  • Localization of an Asp.net mvc Core application
  • Cache and cache profiles
  • Cache tag helper in MVC 6
  • How to organize your Asp.net mvc controller

Archives

  • August 2016
  • June 2016
  • May 2016
  • December 2015
  • November 2015
  • October 2015
  • May 2015
  • April 2015
  • March 2015
  • July 2014
  • January 2014
  • January 2013
  • December 2012
  • August 2012

Categories

  • ASP.NET (1)
  • ASP.NET MVC (14)
  • C# (1)
  • Javascript (1)

Archives

  • August 2016
  • June 2016
  • May 2016
  • December 2015
  • November 2015
  • October 2015
  • May 2015
  • April 2015
  • March 2015
  • July 2014
  • January 2014
  • January 2013
  • December 2012
  • August 2012

Meta

  • Log in
© 2014 ascent. All rights reserved | Ascent by NetTantra