The app does not allow edits to the pre-existing card view contents
I have a simple webapp as per screenshot; the app loads the data from my MariaDB and displays it in the form of the card view (Property Name: asere).
You can see the bottom edit button in there too. The problem is that the Edit button does not let me edit anything on this card view. The debug shows what happens in the backend as follows
`
My Datatable only has this entry with Id = 3 as per datatable below. Does anyone have any idea why my controller (EditUserJ) accesses the Id = 0 instead of the pre-existing Id 3?? I guess this wrong access caused my Edit button to be not functional as I wanted.
+-----------+-------------+-------------------+------------+------------+
| ListingId | ListingName | ListingProjectsId | CategoryId | LocationId |
+-----------+-------------+-------------------+------------+------------+
| 3 | asere | 6 | 0 | 0 |
+-----------+-------------+-------------------+------------+------------+
My full code for your reference https://pastebin.com/frwuc0dx
Pastebin
/* Edit View*/@model IEnumerable@{ ViewData["Titl - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
1 Reply
where do you get $("#IdEdit") from?