<pre lang="c#">var httpContext = HttpContext.Current;
if (HttpRuntime.UsingIntegratedPipeline)
Server.TransferRequest("EditDetail?ID=" + Convert.ToString(e.CommandArgument) + "&mode=Edit", true);
else
{
httpContext.RewritePath("EditDetail?ID=" + Convert.ToString(e.CommandArgument) + "&mode=Edit", true);
IHttpHandler httpHandler = new MvcHttpHandler();
httpHandler.ProcessRequest(httpContext);
}
public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)
{
return routeDirection == RouteDirection.IncomingRequest;
}