I continued the existing project from the previous developer.
I would like to get some enlightenment as to why the data cannot be updated to the database when I add another code to the existing code file?
This project is developed using ASP.Net 4.7.2 Web Forms and deployed on IIS Server and I want to add some code for my task. But whenever I add getting error 500 - Internal Server Error. I have try troubleshoot on everything but nothing is working on the server.
By using the same code, when I try to debug on my localhost everything works fine. The page able to view and the value of the data field I add can be updated to the database.
But when I applied on Server, the page getting error 500 when I add new method function which is from my localhost it's working fine.
Is there any part I need to check?

I have tried many things but nothing is working on server.