我正在使用大约3个政党课程。 在这方面,我想得到我的控制者的路线价值。 不幸的是,我没有把执行中的现任控制者交给我。 我能否从HttpContext那里获得?
这一类人认为:
public class ServiceStationVisibilityProvider
: ISiteMapNodeVisibilityProvider
{
public bool IsVisible(SiteMapNode node, HttpContext context, IDictionary<string, object> sourceMetadata)
{
node.Title = DateTime.Now.ToString(); //need to access routevalues and set title
return true;
}
Now I could manully inspect Request.RawUrl and parse and do funky things. However, I don t want to write that kind and fall into trouble later when the application grows. }