Skip to content

{ Tag Archives } asp.net mvc

Replacing Controller.Session in ASP.NET MVC: Is This Wrong?

Here’s some code I wrote:

public class MyBaseController : Controller
{
// …
public new ISession Session { get; private set; }
// ….
}

ISession is an interface type I wrote which exposes everything I store in the session at runtime. I use constructor injection to assign this to [...]

Also tagged ,

Don’t Depend Upon the ASP.NET Membership Tables

One very popular option for implementing user security in ASP.NET is to use Forms Authentication with the SQL Server membership provider. This provider creates several database tables to store user-related information, as well as a number stored procedures.
From time to time, a developer will attempt to add the ASP.NET Membership/Forms Authentication tables to their Entity [...]

Also tagged , , ,

Projecting Onto a Presentation Model with the Entity Framework and ASP.NET MVC

In this post, I will demonstrate how to map entity models to views in an ASP.NET MVC application without worrying about implementation details like eager loading, lazy loading, or having to manually optimize SQL for the task at hand. I will argue that expressing the relationship between an entity model in the presentation model in [...]

Also tagged ,

Updating to ASP.NET MVC 2 Preview 2

Last week, I updated our main development branch to ASP.NET MVC 2 preview 2 (from preview 1). In this post, I’ll list some of the features I’ve found, and also issues I encountered and how I resolved them.
New Features
Some of the new features of preview 2 have been discussed elsewhere, so I won’t rehash them. [...]

Also tagged , , ,

How to Customize ASP.NET MVC Authentication

If you are developing a web application which requires authentication or security features not included in the regular ASP.NET membership feature, you might decide to implement these features yourself. But it seems as if the first instinct of many ASP.NET MVC developers is to do this by customizing their Controllers, because they’ve decided that AuthorizeAttribute [...]

Also tagged ,

Using DayPilot with ASP.NET MVC

I’m going to demonstrate how to use the open-source DayPilot Lite calendar control in an ASP.NET MVC application. I will discuss the capabilities of the control and consider the general problem of how to use controls designed for "plain" ASP.NET in MVC applications. I’m including a demo solution which you can download and run yourself.
Download [...]

Also tagged , , ,

Using jqGrid with ASP.NET MVC: Understanding LINQ Errors

If you spend enough time with the PagedList class that I’ve been using for paging in the method which supplies data to jqGrid, it’s a near-certainty that sooner or later you will see a LINQ error with Count in the call stack. The error may seem confusing, because it has nothing to do with Count. [...]

Also tagged , , , , ,

Using jqGrid with ASP.NET MVC: Deleting Records

This is the fifth post in a series on using jqGrid with ASP.NET MVC. Today, we’re going to begin examining the grid’s editing features by implementing deletes. If you’re new to the series, you might want to start at the beginning.
The delete feature of jqGrid is, oddly, almost entirely undocumented, even though there quite a [...]

Also tagged ,

Using jqGrid with ASP.NET MVC: Search and Formatting

This is the fourth post in a series on using jqGrid with ASP.NET MVC. Today, we’re going to examine search and formatting results. I will implement a search feature and fix the problem with formatting date columns which I observed in the last post. I’ve updated the demo solution with these new features, and also [...]

Also tagged , , , ,

Using jqGrid with ASP.NET MVC: Finally, A Solution

Having introduced jqGrid and written LINQ extension methods to make supplying data to the grid easy, we’re now ready to put together a demo application. The solution I’m going to build demonstrates sorting and paging. In a future post, I will enhance it to demonstrate search, formatting, and editing data. I’ve made the demo application [...]

Also tagged ,

Bad Behavior has blocked 713 access attempts in the last 7 days.

Close