asp.net webform route querystring追加.aspx

时间:2014-01-23 03:06:26

标签: 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"]);

0 个答案:

没有答案