i want to route from my controller to .aspx page. i am trying this but that doesn't work.
return Redirect("~/Views/Report/UygulamaYanitiRapor.aspx");
Below code routes but i couldn't get parameter with Request.QueryString["gelen"]. it comes null.
return Redirect("~/Report/UygulamaYanitiRapor/0");
routes.MapPageRoute(
"Rapor",
"Report/UygulamaYanitiRapor/{gelen}",//{gelen}/{id}",
"~/Views/Report/UygulamaYanitiRapor.aspx",
true, null,
new RouteValueDictionary { { "outgoing", new MyCustomConstaint() } }
);
Check out this walkthrough on how to set up routing for Asp.Net Web Forms: http://msdn.microsoft.com/en-us/library/dd329551.aspx
I think the easiest way to get this working is to modify your aspx-page to check both Request.QueryString
and Page.RouteData.Values
for the same values, possibly with a preference for the QueryString values.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.