url routing with strongly typed objects
- by user510336
hello all , I am trying to create url routing with strongly typed objects for pages but I keep getting null object on the first line so it's crashing
//Getting the suitable executing Page
var display = BuildManager.CreateInstanceFromVirtualPath(_virtualPath,typeof(Page)) as IProfileHandler;
//Setting Page Parameters
display.MemberId = Convert.ToInt32(requestContext.RouteData.Values["ID"]);
//Return Page
return display;
public interface IProfileHandler : IHttpHandler
{
int MemberId
{
get;
set;
}
}