Some information on what I'm doing
I usually like it when my pages return the URL needed to access it. So I will usually have this method
public partial class ProductDetails : Page
{
public static string GetUrl(Guid productId)
{
return "fully qualified url";
}
}
on my other pages / controls that need to access this page, I just set the link as
hl.NavigateUrl = ProductDetails.GetUrl(id);
I am working with new UrlRouting stuff in 4.0 and have come across something that I'm not sure if this will work. I am trying to use Page.GetRouteUrl in my static method, and obviously it explodes because the page is not static.
Does anyone know if it is possible to repeat what I am doing with GetRouteUrl?
THX
source
share