"Güncelle" button not working

Harun Ergün 260 Reputation points
2023-01-31T06:19:44.85+00:00

Screenshot_2

Screenshot_3

Screenshot_4

Screenshot_5

ı dont undestand. Delete's working but update(Güncelle) not working. Where's my mistake ?

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,289 questions
ASP.NET API
ASP.NET API
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
303 questions
{count} votes

Accepted answer
  1. Lan Huang-MSFT 25,876 Reputation points Microsoft Vendor
    2023-01-31T07:47:52.47+00:00

    Hi @Harun Ergün,

    You provided a lot of code, but due to naming issues, we can only guess from the code.

    Your update button is Güncelle and the update method is DepartmanGetir. DepartmanGetir is the HttpGET update method, and DepartnanGuncelle is the HttpPost update method?

    I'm guessing you're having a naming issue, you need to change DepartnanGuncelle to DepartmanGetir.

    User's image

    User's image

    Regarding the 404 issue, have you defined the cshtml page file of DepartmentmanDetay? and return the view in the controller?public ActionResult DepartmentmanDetay(){return View();}

    I suggest you can study the documentation:

    https://learn.microsoft.com/en-us/aspnet/mvc/overview/getting-started/getting-started-with-ef-using-mvc/updating-related-data-with-the-entity-framework-in-an-asp-net-mvc-application

    https://learn.microsoft.com/en-us/aspnet/mvc/overview/getting-started/introduction/examining-the-edit-methods-and-edit-view

    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful