i have 2 views in my App
1:Views->Season->ViewSeason
2:Views->Admin->Season->ViewSeason
How i write Controller for this? pls help me.....
From stackoverflow
-
Easiest thing to do would be to collapse Admin/Season into AdminSeason and have an AdminSeasonController.cs.
Then update your routing table so the /Admin/Season routes to AdminSeasonController.
This is untested, but it could look like this in your Global.ascx (above the out-of-box MVC route):
routes.MapRoute( "AdminSeason", "Admin/Season", new { controller = "AdminSeason", action = "Index" } );Here are some other questions re: MVC Routing:
- ASP.Net MVC route mapping
- ASP.NET MVC routing
- ASP.NET MVC Routing Question
- Problem with ASP.NET MVC routing
Avinash : pls give the code for writing in global.ascx file
0 comments:
Post a Comment