using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.Routing;

/// <summary>
///RoutePage 的摘要说明
/// </summary>
public class RoutePage:Page
{
    #region IRouteTablePage 成员

    public RequestContext RequestContext
    {
        get;

        set;
    }

    #endregion

    public RouteValueDictionary RouteValues
    {
        get
        {
            if (RequestContext != null)
            {
                return RequestContext.RouteData.Values;
            }
            return null;
        }
    }

    public object GetRouteValue(string key)
    {
        object resultvalue = null;
        if (RouteValues != null && RouteValues.Count > 0)
        {
            RouteValues.TryGetValue(key, out resultvalue);
        }
        return resultvalue;
    } 
}
