I have worked on jquery ajax before but got stuck into an issue. Let me share the problem with you all.
There are 2 projects in a solution - Project 1 and Project 2. In Project 1 there is a jquery ajax call, where the call is made to a .cs file (AlleryControl.cs) in Project 2 and it has a method - generateToolbarMenu().
AllergyControl.cs file is a partial class file and the method access specifier is 'internal'.
While running the application, it is showing "404 Error" and it says the file not found.
This is an MVC project. Only the Project 1 is being hosted. When I am running the application, it is pointing to Project 1. Then if the filepath is going wrong, how to specify the filepath for the .cs file in Project 2?
Or is it something else which I need to check?
What I have tried:
I have tried all of the following one by one:
1. Changed the "type" property in jquery ajax from "POST" to "GET".
2. Added [WebMethod] attribute for the function and also changed the access specifier from "internal" to "public".
3. While running the application, changed the filepath on the fly, but could not identify what should be the actual filepath?