Home > Net >  With asp.net MVC pattern development website, users do not preach int32 parameter of type applicatio
With asp.net MVC pattern development website, users do not preach int32 parameter of type applicatio

Time:11-18

As title, found that the parameters of controller, if the user doesn't pass this parameter, program error directly, not to give any judgment return errors, how to do,

For instance I this public ActionResult HouseTypeInfo (int houseid, int the typeid)

Users don't preach houseid error directly, don't give me any judge disposal way,

Please people!

CodePudding user response:

That is what happened to the front, don't mind

CodePudding user response:

This
Public ActionResult HouseTypeInfo (int? Houseid, int? Typeid)

Then use hasvalue to judgment,
  • Related