Author: mycwcgr | Posted on: 6/29/2010 11:16:47 PM | Views : 1184

I hope to map the following URL, Is routes.MapPageRoute("", "{ProgramID}", "~/RunProgram.aspx") correct?  Thanks!
http://www.a.com/1 => http://www.a.com/RunProgram.aspx?ProgramID=1
http://www.a.com/2 => http://www.a.com/RunProgram.aspx?ProgramID=2
...

    void Application_Start(object sender, EventArgs e)
    {
        RegisterRoutes(RouteTable.Routes);
    }
   void RegisterRoutes(RouteCollection routes)
    {
        routes.MapPageRoute("", "{ProgramID}", "~/RunProgram.aspx");
    }
    < ...

Go to the complete details ...