. .aspx script. , script, .
...
private static void RegisterRoutes()
{
Route currRoute = new Route("{resource}.axd/{*pathInfo}",
new StopRoutingHandler());
RouteTable.Routes.Add( "IgnoreHandlers", currRoute);
currRoute = new Route("{urlname}",
new EPCRouteHandler("~/Default.aspx"));
currRoute.Defaults = new RouteValueDictionary {{"urlname", "index.html"}};
RouteTable.Routes.Add( "Default", currRoute);
}
, ASP.Net 4.0, urlname script URL.
Now, how often the script answers check the database depends on how often the data in the database changes. You can easily cache paths and invalidate the cache when data is supposed to be changed, for example.
source
share