Null entry for the parameter in Asp.net MVC -


i use asp.net mvc coding.

i'm using @html.pagedlistpager when clicking on page number.

this error:

the parameter dictionary contains null entry parameter 'page' of non-nullable type 'system.int32' method 'system.web.mvc.actionresult pagegroup (int32)' in '****.areas.****.controllers.groupcontroller'. optional parameter must reference type, nullable type, or declared optional parameter. parameter name: parameters 

in arearegistration.cs

public override void registerarea(arearegistrationcontext context) {     context.maproute("***_group",                 "***/group/pagegroup/{page}",                 new { page = urlparameter.optional}             ); } 

in view

@html.pagedlistpager(model.groupitems, page => url.routeurl("***_group", new {page})) 

in controller

public actionresult pagegroup(int page)  { //code } 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -