Hi,
1. From Register.aspx, I want to navigate to AvailableCourse.aspx with a value that indicates course id selected from Register.aspx.
2. I use Response.RedirectToRoute method to navigate to AvailableCourse.aspx from Register.aspx.
My RouteConfig.cs
routes.MapPageRoute("Register", "Register.aspx", "~/Register.apsx");
routes.MapPageRoute("AvailableCourse", "AvailableCourse/{selCourseId}", "~/AvailableCourse.apsx");
var settings = new FriendlyUrlSettings();
settings.AutoRedirectMode = RedirectMode.Permanent;
routes.EnableFriendlyUrls(settings);
My question is:How to pass that selCourseId from Register.aspx to AvailableCourse.apsx and how to receive the passed selCourseId in AvailableCourse.cs file ? I am using web application project and I dont have action/control explicitly in my code.
So my expectation is navigation from
http//myserver/Register
to
http//myserver/AvailableCourse/2
http//myserver/AvailableCourse/3
Thanks in advance.
What I have tried:
I tried searching in google but most resources are related to action method but I have used a web application project and friendlyurl feature of MVC, and I dont have action method in my web page.