0
votes

I have an error:

"The parameters dictionary contains a null entry for parameter 'Phone' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Order(Int32[], Int32[], System.String, Int32, System.String, Int32, System.String, System.String, System.String, System.String)' in 'Shop.Controllers.HomeController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter."

This is my Controller

public ActionResult Order(int[] OrderProductCount, int[] OrderProductID, string AllName, int Phone, string Region, int MailIndex, string Email, string City, string MailType, string Additional=null)
     {
        return View("Order");
    }

I can't understand where is error, because when i set form method attribute to get, it had Phone value:

http://localhost:2420/Order?AllName=asdasd&Email=asdsaasd%40asd&City=sdafsdaf&Region=dsfasda&Phone=380983050430&MailIndex=100005&Additional=&MailType=%D0%98%D0%BD%D0%A2%D0%B0%D0%B9%D0%BC&OrderProductID=53&OrderProductCount=32&OrderProductID=52&OrderProductCount=12 
1
Can you show the code that is calling the Order action in your Controller?ShawnOrr
have you tried chaning Phone to String in the controller ?Mauricio Gracia Gutierrez

1 Answers

0
votes

Phone number(380xxxxxxxxx) is biggest that range of integer(-2,147,483,648 to 2,147,483,647).