i put this in Global.asax.cs
routes.MapWebFormRoute("Page", "Page/{*anything}", "~/Page.aspx", false);
how i can get value of {*anything} in Page.aspx
i'm using WebFormRouting from codeplex
i put this in Global.asax.cs
routes.MapWebFormRoute("Page", "Page/{*anything}", "~/Page.aspx", false);
how i can get value of {*anything} in Page.aspx
i'm using WebFormRouting from codeplex
For WebFormRouting, you should check out this blog post by Phil Haack:
Using Routing With WebForms
http://haacked.com/archive/2008/03/11/using-routing-with-webforms.aspx
He says that, If your Web Form Page implements the IRouteable interface, the WebFromRouteHandler class can pass it the RequestContext. Once this is done, you should still be able to do
string value = Page.RouteData.Values("anything");
or something similar. There is a sample project at the blog post.