How can i create one page with the mode code-behind .
Some page dynamic like
http://localhost/pagedetail/2
http://localhost/pagedetail/3
so i want to create one page(codebehind) like pagedetail to show querystring?
There's a need to notify the route handler that the control on the page is expecting URL parameters to be resolved. To achieve this you need to set the UrlParamtersResolvedKey in the
CurrentHttpContext.Items collection.
You can use the RouteHelper.SetUrlParametersResolved() implementation exactly for these purposes, however please note that this needs to be done in a early stage of the control lifecycle, as we're checking for the key on PreRender_Complete event.
protected override void OnInit(EventArgs e)
base.OnInit(e);
RouteHelper.SetUrlParametersResolved();
protected void Page_Load(object sender, EventArgs e)
var param = this.GetUrlParameterString(true);
ParamLiteral.Text = param;