问题
I am try use routing concept.I want to show url accoding to page.all pages are created by dynamic. Everypage have it's own unique id.I know about basic concerpt
I am adding global.asax file
void Application_Start(object sender, EventArgs e)
{
RegisterRoutes(System.Web.Routing.RouteTable.Routes);
}
void RegisterRoutes(System.Web.Routing.RouteCollection routes)
{
routes.MapPageRoute("Home", "home1", "~/default.aspx");
routes.MapPageRoute("Home", "home2", "~/default2.aspx");
}
and C# coading
RouteValueDictionary para = new RouteValueDictionary { {"","" } };
VirtualPathData abc = RouteTable.Routes.GetVirtualPath(null,"home",para);
hyper.NavigateUrl = abc.VirtualPath;
My question is how i get the page id from database and where i can pass this value...
来源:https://stackoverflow.com/questions/15944852/i-am-try-use-routing-concept