Extending MVC: Auto Refreshing A Partial View Using AJAX

This is something that I put together in a few minutes to provide a way to refresh a partial view on a specified time interval. Let’s create a MVC User Control that displays the current date and time called "TimeControl.ascx": 1: <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TimeControl.ascx.cs" Inherits="SAWeb.UI.Views.UserControls.TimeControl" %> 2: <div> 3: <%= DateTime.Now.ToString() %> 4:…

4

Extending MVC: Returning an Image from a Controller Action

So I was thinking tonight, what if I want my MVC application to serve images that are stored in a SQL database as binary data? Or files that are stored in the database?   One of the things that I really like about MVC is that ability to add custom functionality in a fairly simple way. …

17

Autocompletion Textbox in MVC Using jQuery

Ok, I have to admit it: jQuery is awesome.  If you haven’t started looking at it, I highly recommend that you do.  It works wonders in the ASP.NET MVC world.  One of the best things about jQuery is the enormous number of plug-ins that are available for adding even more functionality to the library. The…

30

CheckBoxList Helper for MVC

The early previews of the MVC Toolkit contained a few helpers that are not available in the current MVC Beta and MVC Beta Futures.  On of the ones that was nixed was the CheckBoxList helper.  I was in need of this type of functionality lately and found myself out of luck.  I needed to add…

18