Reputation: 5791
I have been having a problem with a form select which allows users to make a selection on a modal edit.
here is the modal ui - a users may select a 'software type'.
The page renders without errors (according to chrome devtools)
I get an error upon Saving (with or without changes)
I suspect it's some sort of type casting error where the service expects an int and i'm sending a string. if that theory is right how do i proceed from here? the js file for the save button calls the service to do the save directly so i don't get a chance to anything server side.
Appreciate any ideas, Thanks for reading.
CSHTML
Here is my _cshtml file
Upvotes: 0
Views: 481
Reputation: 1
Reason for failure is straightforward, You are sending the invalid value for SoftwareType
, it could be undefined
, null
or an empty value if the datatype is int or similar. You can check this in the browser, you can refer the below screenshot.
You can also check your model for the valid SoftwareType
value.
You should send SoftwareTypeId
not SoftwareType
in the request.
Upvotes: 1