none
Server Error in '/' Application. RRS feed

  • Question

  • The parameters dictionary contains a null entry for parameter 'checkingAccountId' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Deposit(Int32)' in 'ATMP.Controllers.TransactionController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
    Parameter name: parameters.

    how do i go about this?

    • Moved by CoolDadTx Monday, March 26, 2018 2:01 PM ASP.NET related
    Sunday, March 25, 2018 9:47 PM

All replies

  • public ActionResult Edit(int id = 0)
     { 
         return id == 0 ? null : View(studmods.Edit(id));
     }

    You can give an optional parameter of = 0

    https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/named-and-optional-arguments

    https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/conditional-operator

    MVC issues can be discussed at the ASP.NET forums.

    https://forums.asp.net/

     

    Monday, March 26, 2018 1:14 AM
  • Please post questions related to ASP.NET in the ASP.NET forums.

    Michael Taylor http://www.michaeltaylorp3.net

    Monday, March 26, 2018 2:01 PM