C
C#2mo ago
Yasaki Kondo

Asp.mvc I can't delete an item

I can't seem to get this working as intended, it's not showing me the screen for deleting an item. Any fixes?
29 Replies
Yasaki Kondo
Yasaki KondoOP2mo ago
No description
Jimmacle
Jimmacle2mo ago
look at the URL you're going to and compare that to the routes you've defined
Yasaki Kondo
Yasaki KondoOP2mo ago
I just noticed the localhost change from 7043 to 7085. that's new nah still doesn't work, same problem
Jimmacle
Jimmacle2mo ago
the port isn't the problem you're going to a route called Food/Edit, where is that defined in your code?
Yasaki Kondo
Yasaki KondoOP2mo ago
It said food update doesn't it?
Jimmacle
Jimmacle2mo ago
no, it doesn't
Yasaki Kondo
Yasaki KondoOP2mo ago
I've just realised wait hold on let me check smth, idk why it said food edit okay that lead somewhere, though the delete still have the same problem
Jimmacle
Jimmacle2mo ago
it's probably a similar issue check your routes/verbs
Yasaki Kondo
Yasaki KondoOP2mo ago
i don't think so, I checked and it did said food/delete correctly
Jimmacle
Jimmacle2mo ago
but are you sending a GET or a POST?
Yasaki Kondo
Yasaki KondoOP2mo ago
on update I sending aa put delete i am sending a delete I just changed it to post just in case but same problem
Jimmacle
Jimmacle2mo ago
okay, so compare that to the routes you've defined in your code
Jimmacle
Jimmacle2mo ago
No description
Jimmacle
Jimmacle2mo ago
that doesn't look like it says delete to me
Yasaki Kondo
Yasaki KondoOP2mo ago
I change it to delete and still same problem
Jimmacle
Jimmacle2mo ago
what do your logs say
Yasaki Kondo
Yasaki KondoOP2mo ago
No description
Jimmacle
Jimmacle2mo ago
that doesn't show you making any of the requests that you're saying are broken
Yasaki Kondo
Yasaki KondoOP2mo ago
I didn't say it was broken
MODiX
MODiX2mo ago
Yasaki Kondo
okay that lead somewhere, though the delete still have the same problem
Quoted by
React with ❌ to remove this embed.
Jimmacle
Jimmacle2mo ago
look into making your logging more verbose so you can see what's going wrong
Yasaki Kondo
Yasaki KondoOP2mo ago
ok fix the update issue, it somehow didn't take in the ID of the item had to add in first or default thingy var foodItem = foodList?.FirstOrDefault(f => f.Id == ID); still; haven't fix the delete problem tho help I'm getting blind sighted, I can't seem to find where's the issue, it's still showing black screen
Jimmacle
Jimmacle2mo ago
have you used your browser dev tools to see what the server is sending back?
Yasaki Kondo
Yasaki KondoOP2mo ago
I don't use browser dev tools...
Jimmacle
Jimmacle2mo ago
you should, because that will help you diagnose the problem
Yasaki Kondo
Yasaki KondoOP2mo ago
right now I don't want to go through the hassle of installing a web browser dev kit for it
Jimmacle
Jimmacle2mo ago
what? just press f12
Yasaki Kondo
Yasaki KondoOP2mo ago
I though u need to install some kind of browser dev thingy
Yasaki Kondo
Yasaki KondoOP2mo ago
it shows this
No description
Want results from more Discord servers?
Add your server