I have a table of data which contains newsarticles.
ive created standard CRUD views/forms and it has paging too.
eg at the moment i have urls's like this:
// GET: /News/
// /News/Page/2
News articles can be archived (a boolean value in the db)
i want a url to map to only archived data in the db or non archived data.
eg /News/Archived/Page/2 should map to page 2 of only Archived items.
and /News/Page/2 should map to page 2 of non archived items.
what do i need to do in global asax to achieve this. and what should the signature of the index method be?
//Signature in controller
public ActionResult Index(int? page)
//Route for paging
routes.MapRoute(
"NewsArticles",
"News/Page/{page}",
new { controller = "News", action = "Index" }
);