标签: c# asp.net webforms
为什么在提取routedata.values时路由附加.aspx值
routes.MapPageRoute("", "Contact/Edit/{Id}", "~/Contact.aspx", false, new RouteValueDictionary { { "Id", @"\d" } });
获取路线值的代码
int routeval = Convert.ToInt32(RouteData.Values["Id"]);