jessie
Joined: 22 Apr 2010 Posts: 23
|
Posted: Fri Jul 02, 2010 11:37 am Post subject: |
|
|
Hi.,
By default Global .asax file contains
public class MvcApplication : System.Web.HttpApplication
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
}
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
}
}
}
Or it can be empty
If it is empty please copy and paste the above code to your page.
you can handle your own routes like below
routes.MapRoute(
"Answers",
"Answers/{id}/",
new { controller = "Home", action = "Answers", id = "" }
);
its better to follow page navigation concept explained by rajesh (http://www.dotnetexpertsforum.com/implement-page-navigation-in-mvc-like-gridview-control-t1649.html) then you will understand mere _________________ Jessica., |
|