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

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -