Click here to monitor SSC
Dino Esposito

Handling Errors Effectively in ASP.NET MVC

ASP.NET MVC gives you more options in the way that you handle exceptions. Error handling isn't intrinsically exciting, but there are many ways of avoiding the classic yellow page of death, even getting ELMAH to manage error handling for you. Read more...

Dino Esposito

Social Login in ASP.NET MVC

It isn't every web application where one would want visitors to identify themselves via their Twitter, Facebook, Google or LinkedIn account. However, where it is essential to allow comments or other social interaction on your site, then ASP.NET MVC makes a 'social login' like this remarkably simple to do. Read more...

Dino Esposito

Mixing Web Forms and ASP.NET MVC

Just because you're using Web Forms, it doesn't mean that you are stuck in a technical time-warp. If you want to liven up a site with new features using Ajax and libraries such as jQuery, Bootstrap or Knockout.JS, then you can always integrate a Web API layer into a Web Forms application. Dino Esposito shows how to give your Web Forms application a new lease of life. Read more...

Dino Esposito

ASP.NET MVC Paging with OData

It is natural for the user to want to browse through data within an application. Until recently, the interfaces with data sources have been ill-equipped to support this. OData, at last, takes the legwork away with some well-considered support for the paging of data, without imposing any particular conventions on the application. Dino explains how to use it. Read more...

Sergei Dumnov

Adding Public Domain Data to your Software Demos with R

With all the extensions that are available, it is astonishing how little R code is required to achieve impressive BI graphics. You can even use R to take the latest data from a table in a website and apply it to a map in just a few lines of code: and here they are, with Sergei's explanation.. Read more...

Dino Esposito

A Look at the Razor View Engine in ASP.NET MVC

Razor is now the dominant markup language for ASP.NET MVC applications, since it is terse and produces more readable markup than the ASPX syntax. Now with conditional nuggets and URL auto-completion, it is the obvious choice, as Dino explains. Read more...

Dino Esposito

Aspect-oriented Programming and Code Contracts in ASP.NET MVC

There are some aspects to application programming, such as logging, tracing, profiling, authentication and authorization that cut across the business objects. These are difficult to deal with in an object-oriented paradigm without resorting to code-injection, code-duplication or interdependencies. In ASP.NET MVC, you can use attributes in the form of action filters to provide a neater way of implementing these cross-cutting concerns. Read more...

Sergei Dumnov

Creating a Business Intelligence Dashboard with R and ASP.NET MVC: Part 3

By introducing R libraries into an ASP.NET MVC application, it is possible to broaden its analytical and visualization power immensely. To illustrate this, Sergei shows an example of how to use the R libraries Lattice and GoogleVis to detect poorly-performing product categories, the quantity sold and the profit from them, and estimate their demand over time. Read more...

Dino Esposito

Aiming for a Truly Responsive Web Experience

Responsive Web Design (RWD) is starting to take off as a lightweight way to adapt websites for different screen sizes and resolutions, but does it do enough? Dino Esposito thinks we can go further, and offer a better experience to all users, by combining RWD with a server-side approach. Read more...

Dino Esposito

Attribute Routing in Web API v2

Attribute routing solves a lot of the problems of classic ASP.NET routing, which can get ungainly when there are many route handlers, or you have several REST services. Dino shows how to enable and use attribute routing in ASP.NET MVC Read more...

Edward Charbeneau

Functionally Similar - Comparing Underscore.js to LINQ

Underscore.JS is a useful JavaScript library for anyone familiar with the LINQ syntax. It is not a direct LINQ port like Rx or linq.js, but provides a very useful "LINQ-like" experience for anyone familiar with functional programming. Is it similar enough to LINQ to make it easy to transfer your existing skills? Read more...

Sergei Dumnov

Creating a Business Intelligence Dashboard with R and ASP.NET MVC: Part 2

Continuing the project to build a Business Intelligence (BI) application using R, Visual Studio 2012 and Twitter Bootstrap, Sergei introduces drill-down via jQuery and jQuery UI, simplifies the R coding with the PLYR and GGPLOT2 libraries, and shows how to generate reports simultaneously with a batch file Read more...

Dino Esposito

Thoughts on ASP.NET MVC Authorization and Security

It is only a matter of time in developing most websites that you'll need to implement a way of restricting access to parts of the site. In MVC, the 'Authorize' attribute handles both authentication and authorization. In general, it works well, with the help of extension to handle AJAX calls elegantly, and to distinguish between unauthorized users and those who are not logged in. Read more...

Sergei Dumnov

Creating a Business Intelligence Dashboard with R and ASP.NET MVC: Part 1

It is possible to use the R statistical package to extract Business Intelligence from the data in a SQL Server database, and render graphs and tables in HTML to give you a BI Dashboard in an ASP.NET MVC website. Sergei gives you a step-by-step guide. Read more...

Dino Esposito

Auto-completion in HTML-Based Input Forms

Are there ever times when the best practice for a GUI is to let the user type-in information using the keyboard? Of course there are, but then the users nowadays expect, when it is appropriate, to have auto-completion and suggestions that come with the search engines such as Google, and from mobile computers. The GUI must never get in the way. Dino shows how, as usual. Read more...

Dino Esposito

Modal Input Forms in ASP.NET MVC

Forms in websites have, for a long time, languished in their classic clunky pattern of browser-led 'submit' of content, using the FORM tag. As websites grow nearer to applications in their user-experience, so better is required. Dino show how to get a more sophisticated modal input form based on Twitter Bootstrap, jQuery Validate, and XmlHttpRequest (XHR). Read more...

Edward Charbeneau

Refactoring CSS with Sass and Compass

CSS is still a valuable way of specifying the rendered style of HTML objects. By using a preprocessor to assist in generating the CSS, it can make it much simpler to develop and maintain a consistent style in a web development, despite the increasing complexity of the CSS standard. Sass and Compass, for example, can deliver clean, organized, and efficient CSS code, as Edward demonstrates. Read more...

Dino Esposito

ASP.NET MVC: Annotated for Input

With an ASP.NET MVC application of any size, there comes a time when you are faced with creating utility forms where you don't need a special form layout. One of the best ways of doing this is by using data annotations. Despite a quirk or two, it can save a lot of time. Read more...

Edward Charbeneau

Using SASS and Compass in ASP.Net MVC with Web Workbench

The Designers of CSS never envisaged the demands that we make of styles. However, preprocessors such as SASS can provide the obvious missing features such as constants, selector inheritence and nesting. Compass can in turn use SASS to provide a simple browser-independent way of expressing complex layout. Read more...

Dino Esposito

Multiple Views and DisplayMode Providers in ASP.NET MVC 4

Display modes in ASP.NET MVC 4 provide a neat way of separating page content from the way it is rendered on different devices. All you need to do is to define a display mode for each device, or class of devices, that you’re interested in. Read more...

Dino Esposito

ASP.NET MVC 4: What else?

Even ASP.NET MVC can be improved. Dino explains the value of templates, and makes a case for the productivity gains that could come if there was a way of making more interactive custom templates that are honed for your own particular requirements. Read more...

Edward Charbeneau

Exploring HTML Prototypes with Git

Git isn't just for source code, but it also helps with the prototyping of the user interface. It allows for faster iteration and a better structure for making and recording design decisions. GitHub for Windows provides an way to visualize what decisions are available and to work on several possible alternatives independently. Read more...

Dino Esposito

Routing the ASP.NET Way

ASP.NET MVC is built on top of ASP.NET's HTTP handlers and ad hoc URLs. The process of routing a URL to the correct controller/action pair makes it far easier to create any website that plays a more versatile role than merely serving file-based pages. Read more...

Edward Charbeneau

Writing Custom HTML Helpers for ASP.NET MVC

Switching from developing ASP.NET WebForms to MVC might seem awkward at first, but Ed demonstrates why the change needn't be painful, and how best to build a set of tools for rapid MVC development. This article is hosted on Github, so feel free to contribute suggestions, improvements or translations. Read more...

Dino Esposito

ASP.NET: Go Async or Sink

To be scalable, web applications have always had to be asynchronous, even if the programmer did not need to be particularly aware of the fact. However ASP.NET Webforms and ASP.NET MVC now to make it simpler for developers to implement HTTP handlers asynchronously. You can also start implementing asynchronous operations for potentially lengthy tasks in ASP.NET MVC. Dino explains how. Read more...

Dino Esposito

ASP.NET MVC Controllers and Conventions

Why is it that ASP.NET MVC has such strongly-enforced naming conventions? Can conventions for the default behaviour of code actually help to reduce the complexity of applications, and at what point is it wise to break conventions in application architecture. Dino investigates the issues. Read more...

Edward Charbeneau

Rapid Prototyping, the MVC Working Model

If you've ever had to build a working model from scratch, or produce a quick prototype for something, you know it's trickier than it sounds. Thankfully, Ed Charbeneau shows us the tools he uses to make it both quick and easy to produce fantastic (and fantastic-looking) working prototypes in ASP.NET MVC. Read more...

Dino Esposito

Simulating Web API - JSON Formatters in ASP.NET MVC

The Web API framework is a useful tool for building RESTful ASP.NET MVC4 applications, but it's not essential. Dino Esposito demonstrates how you can use MVC3 to simulate several of the really useful web API framework features, and still maintain a nice, clean controller method. Read more...

Nick Harrison

jQuery Fast Food Cook Book

Anyone in IT should be aware of jQuery. This free, open-source JavaScript library has become amost essential to anyone creating a web-based application. Nick Harrison explains, in as sucession of small examples, why it helps his productivity so much, and takes the grudgery out of creating dynamic web pages. Read more...

Edward Charbeneau

Responsive design using Foundation with ASP.Net MVC

There are several frameworks that take away the hard work of implementing a responsive design for a website, that will render pages appropriately according to the size of the window. Ed Charbeneau has pioneered the use of Zurb's Foundation Framework in ASP.NET MVC and describes how easy it is to install and use. Read more...

Dino Esposito

The Three Models of ASP.NET MVC Apps

We've inherited from the original MVC pattern a rather simplistic idea of what should be in the Model. In fact, in ASP.NET MVC, there are three distinct types of model: the domain model, view model and input model. As the data behind an ASP.NET MVC application becomes more complex, the more the view model and domain model may diverge. Read more...

Edward Charbeneau

A Foundation for the Web

Because we can now run browsers on devices of a wide range of screen-sizes, content publishers have had to find ways to fit the layout to the device so that it can be read and navigated effectively. It is no longer good enough to assume a browser-width of 960px. Read more...

Dino Esposito

A Testing Perspective of Controllers and Orchestrators

The neat separation between processing and rendering in ASP.NET MVC guarantees you an application design that is inherently teastable. It doesn't guarantee that your application will be well-designed and quick to test. For that, attention to use-cases and the structure of your code is essential. Read more...

Dino Esposito

Never Mind the Controller, Here is the Orchestrator

The Model-View-Controller pattern of the ASP.NET MVC allows the separation of the business logic from the input and presentation logic. Although it permits the independent development, testing and maintenance of each component, it doesn’t guarantee clean code. Dino Esposito offers a modified approach in which an Orchestrator component helps to keep your controllers small, clean and manageable. Read more...

Dino Esposito

ASP.NET MVC Action Results and PDF Content

The Action Result in ASP.NET MVC provides a simple and versatile means of returning different types of response to the browser. Want to serve a PDF file with dynamically-generated content? Do an SEO-friendly permanent redirect? Dino shows you how simple this can be using a tailor-made ActionResult class Read more...

Matteo Slaviero

Authentication and Authorization with Windows Accounts in ASP.NET

If you are providing web-based information for a closed group of users, such as a company or similar organisation with roles and membership, then Windows authentication make a great deal of sense for ASP.NET websites or even .NET applications. Why, and how do you implement it? Matteo explains all. Read more...

Edward Elliott

How The Garbage Collector Can Cause Random Slowness

If your website is suffering from slow performance, it's easy to blame the code, but not always correct. Even in if you're using .NET, you need to be aware of how your memory is being managed, and sometimes it's .NET that's the culprit. Read more...

Shailesh Patel

Understanding Browser-Based Silverlight Project Architecture

A large part of Silverlight's allure is in its cross-browser capabilities, and that power is derived from its rendering architecture. Understanding that in-browser architecture will make your life easier when it comes to troubleshooting, and so Shailesh Patel takes us through it. Read more...

Jinath Premaratne

WebMatrix: Website Development made easier?

Microsoft's WebMatrix Beta 2 comes with some interesting technologies, such as Razor and IIS Developer Express. It promises a much simpler way of getting Web Applications up and running, either by using a configurable package, or by writing code from scratch. Jinath investigates to see what's in store with WebMatrix. Read more...

Jeremy Jarrell

Two Steps Forward to More Secure Applications

Are you certain that you know enough about cross-site scripting attacks, and SQL Injection to avoid either of them happening to that site you're responsible for? Even though these exploits are easy to avoid, many developers still aren't taking the necessary precautions, so we asked Jeremy Jarrell to come up with simple guidelines. Read more...

Nick Harrison

jQuery Goodness in a DotNet World

jQuery is one of the most popular JavaScript frameworks. It shields the programmer from the idiosyncrasies in the way that each browser implements the language: it makes life easier by doing all the routine chores and takes the pain out of AJAX. It also introduces a 'Wow' factor to browser-based applications. Read more...

William Brewer

Advice on CSS you'll wish your mother told you

William Brewer turns a jaundiced eye to the task of laying out web pages using CSS, and gives some nuggets from years of occasional page design. It is, of course, set with a a stylesheet he's come up with to demo a few of his points. Read more...

Matteo Slaviero

AJAX basics with jQuery in ASP.NET

ASP.NET now has support for the jQuery JavaScript library. Although ASP.NET integrated AJAX technology by introducing the is the UpdatePanel server control, jQuery offers an alternative, and more versatile, way of doing it and a great deal more besides. Matteo shows how easy it is to get started with using jQuery. Read more...

Ludmal De Silva

ASP.NET 4.0 Features

ASP.NET v4 is released with Visual studio 2010. Web developers are presented with a bewildering range of new features and so Ludmal De Silva has described what he considers to be the most important new features in ASP.NET V4 Read more...

Jonas Stawski

Mapping Your Data with Bing Maps and SQL Server 2008

Jonas Stawski takes you, step by step, through a sample project that demonstrates how to create an application that can get GeoSpatial coordinate data for addresses within a SQL Server database, and then use that data to locate those addresses on a Bing Map on a website as pushpins, either grouped or ungrouped: And there is full source-code too, in the speech-bubble. Read more...

Nick Harrison

Back to Basics: Structuring a Web Page with CSS and ASP.NET

Nick explains why such habits as using nested HTML Tables to position content in the right place on the browser page is bad practice and, nowadays, avoidable. This is just one 'Markup smell' that he discusses on the way to demonstrating the benefits of CSS Style-sheets and ASP.NET Master Pages. Read more...

Ion Freeman

Rendering Hierarchical Data with the Treeview

It sometimes happens that Web Server controls that visualize data don't quite fit with the way that the data is actually held in the application. This shouldn't be an obstacle, as Ion Freeman points out. To prove his point, he shows how to use Nested Sets with Treeview. Read more...

Daniel Penrod

Ext Framework, jQuery and ASP.NET

If you are developing a browser-based application, or using Adobe AIR, then jQuery and Ext JS are prime choices for your framework. Of course you could code it all in raw Javascript and HTML but Daniel Penrod hasn't got the time or the inclination to type code all day. He wants results! Read more...

Daniel Penrod

Using WebServices with ASP.NET

Webservices without tears? Popup maps in your websites? Word-completion? Ajax-based Search-engines? No problems, with Daniel's sample application to guide you. Read more...

Jonas Stawski

Take Row-Level Control of Your GridView

The ASP.NET GridView is great for very simple tables, but the real world is not always as straightforward as we would like it to be. Sometimes we need to specify the format of the data from the database, and the way it is rendered in the table, more exactly. Read more...

Gaidar Magdanurov

Implementing Waiting Pages in ASP.NET

The users of your application will be more likely to tolerate pauses in your application whilst processing goes on, if you provide a 'waiting' page. Read more...

Dan Wahlin

ASP.NET Master Pages Tips and Tricks

Take a look at how you can increase productivity and reduce maintenance with your ASP.NET 2.0 website, as Dan Wahlin shares his techniques for handling master pages. Read more...

Dan Wahlin

Enhance your Website with ASP.NET AJAX Extensions

Microsoft's ASP.NET AJAX Extensions provide developers with a quick and simple way to add AJAX functionality into any ASP.NET Website. In this article, Dan Wahlin demonstrates how to use the UpdatePanel control, which performs asynchronous postback operations that update a portion of a page rather than the entire page itself. Read more...

Gaidar Magdanurov

A Complete URL Rewriting Solution for ASP.NET 2.0

Ever wondered whether it's possible to create neater URLS, free of bulky Query String parameters? Gaidar Magdanurov shows you how with a step-by-step guide to his rewriting solution for ASP.NET 2.0. Read more...

Damon Armstrong

Regular Expression Based Token Replacement in ASP.NET

Damon Armstrong presents an extremely powerful and flexible token replacement mechanism for your ASP.NET applications. It is based on regular expressions so allows you to search for dynamic text, instead of just a static token, in a given string. Read more...

Chris Ullman

Calling Cross Domain Web Services in AJAX

The latest craze for mashups involves making cross-domain calls to Web Services from APIs made publicly available by companies such as Google, Flickr and so on. Unfortunately, the XMLHttpRequest object doesn’t allow calls made in one domain to a web service in another. The article surveys the current, somewhat unsatisfactory, solutions and then assesses future directions. Read more...

Damon Armstrong

Token Replacement in ASP.NET

Damon Armstrong describes an elegant way of performing dynamic string replacement in ASP.NET applications - one that will work in any situation imaginable! Read more...

Damon Armstrong

Web Parts in ASP.NET 2.0

Most Web Parts implementations allow users to create a single portal page where they can personalize the look, feel, functionality, and experience of their "My Home" page in an application. But what if you want to take Web Parts a step further and allow users to define a personalized interface that applies to a series of pages in an application? Read more...

Rick Strahl

ASP.NET 2.0 and VS 2005 - You win some, you lose some

Rick Strahl takes stock of the major changes and provides a personal perspective on some of the highs and lows of ASP.Net 2.0 and VS 2005. Read more...

Steve Joubert

Beginning ASP.NET 2.0

It seems that there is both excitement and confusion surrounding Master Pages and Themes. A big part of the problem is that they always seem to be mentioned in the same breath – like I just did. The reality is that they are two separate but equally important technologies. Read more...

Ludmal De Silva

ASP.Net configuration

Although it can be used in production sites, simply editing the web.config XML file, is not particularly user friendly. So this article introduces Visual Studio 2005’s WSAT to configure your web application. Read more...

Paul Glavich

Asynchronous client script callbacks

This article provides an example of asynchronous client script callbacks in ASP.NET V2.0. Read more...

Most Viewed

A Complete URL Rewriting Solution for ASP.NET 2.0
 Ever wondered whether it's possible to create neater URLS, free of bulky Query String parameters?... Read more...

Visual Studio Setup - projects and custom actions
 This article describes the kinds of custom actions that can be used in your Visual Studio setup project. Read more...

.NET Application Architecture: the Data Access Layer
 Find out how to design a robust data access layer for your .NET applications. Read more...

Calling Cross Domain Web Services in AJAX
 The latest craze for mashups involves making cross-domain calls to Web Services from APIs made publicly... Read more...

Web Parts in ASP.NET 2.0
 Most Web Parts implementations allow users to create a single portal page where they can personalize... Read more...

Why Join

Over 400,000 Microsoft professionals subscribe to the Simple-Talk technical journal. Join today, it's fast, simple, free and secure.