jazb
jazb

Reputation: 5791

Form Select using Bootstrap in ABP

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'.

enter image description here 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.

enter image description here

CSHTML Here is my _cshtml fileenter image description here

Controller enter image description here

_EditPracticeModal.js enter image description here

Mvc\App_Data\Logs\Logs.txt enter image description here

Upvotes: 0

Views: 481

Answers (1)

Vivek Nuna
Vivek Nuna

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.

Chrome Developer tool

You can also check your model for the valid SoftwareType value.

You should send SoftwareTypeId not SoftwareTypein the request.

Upvotes: 1

Related Questions