url routing with strongly typed objects
Posted
by
user510336
on Stack Overflow
See other posts from Stack Overflow
or by user510336
Published on 2011-01-09T16:43:21Z
Indexed on
2011/01/09
16:54 UTC
Read the original article
Hit count: 185
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;
}
}
© Stack Overflow or respective owner