Hi All,
The Function below gives this error, it is not clear why:
The parameters dictionary contains a null entry for parameter 'FileID' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.PartialViewResult FileDetails(Int32)' in 'BFR_LOCAL_DB.Controllers.COController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
Parameter name: parameters
<HttpGet>
Public Function FileDetails(ByVal FileID As Integer) As PartialViewResult
Dim DetList As List(Of FILE_ATTACHMENT_TBL) = GetFileList(FileID)
Return PartialView("FileDetails", DetList)
End Function
I try to call it two ways"
Way one: With not Parameter
http://localhost:60573/CO/FileDetails
When I try to pass a Parameter I get the same Error when I try call it this way
http://localhost:60573/CO/FileDetails/1945
But If I hard Code 1945 into the Function it works. See below
<HttpGet>
Public Function FileDetails() As PartialViewResult
Dim DetList As List(Of FILE_ATTACHMENT_TBL) = GetFileList(1945)
Return PartialView("FileDetails", DetList)
End Function
So oddly this works. What's throwing me is that the Error happens even before I am able to step into
the source codes to see why. It gives not errors during compile time.
There error is not very clear as it it saying there is an int32 but as it has been shown. The value is declared as integer.
so something has gone wacky over here I am guessing.
I am just try to the function before I wire it up to the rest of the program, Any help or ideas would be great.