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 KondoOP4w ago
No description
Jimmacle
Jimmacle4w ago
look at the URL you're going to and compare that to the routes you've defined
Yasaki Kondo
Yasaki KondoOP4w ago
I just noticed the localhost change from 7043 to 7085. that's new nah still doesn't work, same problem
Jimmacle
Jimmacle4w 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 KondoOP4w ago
It said food update doesn't it?
Jimmacle
Jimmacle4w ago
no, it doesn't
Yasaki Kondo
Yasaki KondoOP4w 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
Jimmacle4w ago
it's probably a similar issue check your routes/verbs
Yasaki Kondo
Yasaki KondoOP4w ago
i don't think so, I checked and it did said food/delete correctly
Jimmacle
Jimmacle4w ago
but are you sending a GET or a POST?
Yasaki Kondo
Yasaki KondoOP4w 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
Jimmacle4w ago
okay, so compare that to the routes you've defined in your code
Jimmacle
Jimmacle4w ago
No description
Jimmacle
Jimmacle4w ago
that doesn't look like it says delete to me
Yasaki Kondo
Yasaki KondoOP4w ago
I change it to delete and still same problem
Jimmacle
Jimmacle4w ago
what do your logs say
Yasaki Kondo
Yasaki KondoOP4w ago
No description
Jimmacle
Jimmacle4w ago
that doesn't show you making any of the requests that you're saying are broken
Yasaki Kondo
Yasaki KondoOP4w ago
I didn't say it was broken
MODiX
MODiX4w ago
Yasaki Kondo
okay that lead somewhere, though the delete still have the same problem
Quoted by
React with ❌ to remove this embed.
Jimmacle
Jimmacle4w ago
look into making your logging more verbose so you can see what's going wrong
Yasaki Kondo
Yasaki KondoOP4w 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
Jimmacle4w ago
have you used your browser dev tools to see what the server is sending back?
Yasaki Kondo
Yasaki KondoOP4w ago
I don't use browser dev tools...
Jimmacle
Jimmacle4w ago
you should, because that will help you diagnose the problem
Yasaki Kondo
Yasaki KondoOP4w ago
right now I don't want to go through the hassle of installing a web browser dev kit for it
Jimmacle
Jimmacle4w ago
what? just press f12
Yasaki Kondo
Yasaki KondoOP4w ago
I though u need to install some kind of browser dev thingy
Yasaki Kondo
Yasaki KondoOP4w ago
it shows this
No description
Want results from more Discord servers?
Add your server