views:

65

answers:

1

Hi, i am new to this mvc framework in asp.net. My problem is I have implemented pagination in my application and its working fine asp.net development server when i click to the page link on addressbar it shows me http://localhost:1139/eigencrm/AdminUsers?page=2 and display the lists on second page. In the AdminUsers Controller i have defined the method called Index and page as follows

public ActionResult Index(int? page)
    {
        List<userview> userview = _entities.userview.ToList();
        PagedList<userview> data = new PagedList<userview>(userview, page ?? 1, 2);
        return View(data);

    }
public ActionResult Page(int? id)
    {
        //return View();
        return RedirectToAction("Index","AdminUsers", new { page = id });

    }

And in the view part i have used <% this.ShowPagerControl(Model,"AdminUsers", "Page"); %>

But it doesnt work on IIS server it gives me an error page not found Is there problem of routing in global.asax or the problem of IIS server version. please help me i am have to deploy pagination on IIS server which is right now not working but on local server it is working.

+1  A: 

Do you have a wildcard mapping in the IIS website? If not you can find here how to add one.

Branislav Abadjimarinov
+1 for suggesting wildcard mapping in IIS. It looks as if that's the problem because the URL provided by the OP is extensionless.
Darin Dimitrov
hey i followed your suggestion but now some of my IIS server setting has been changed so i am getting page not found error. I cannot see my application on the IIS server. Please help me to solve this one first
Arpan