日期:2010-02-20  浏览次数:20456 次

讲起来比较费劲,把项目文件放上来,而下面只作一个简单的说明。项目是VS2008的项目,大小15K。

下载地址:DotNetMVC.rar

首先构建一个Controller基类。

以下为引用的内容:

Controller类
/**
 * author : yurow
 *      
http://birdshover.cnblogs.com
 * description:
 *      
 * history : created by yurow 2009-9-20 7:30:04 
 
*/

using System.Web;
using System.Web.Services;

namespace DotNetMVC.MVC {
    
/// <summary>
    
/// 控制器
    
/// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo 
= WsiProfiles.BasicProfile1_1)]
    
public abstract class Controller<T, K> : IHttpHandler {
        
/// <summary>
        
/// 当前请求