Ajax request 500 error--but want to implement the function is to divide a page into two parts, click on the right navigation bar, the use of AJAX requests, request data, the right side of the corresponding page, then the use of partialaction and then appeared this 500 error, The main thing is that on this action, a page cannot ajax request another page. At that time on the entity set is not very understanding, for the auto-generated model layer, thought can not be changed, then I have to access a few tables to have a few controllers, there must be a few actions, feel completely unable to achieve. The final answer is to write another model class, and then add the table you need.
public class Moretable {
Public list<table1> table1{get; set;}
Public list<table2> tablr2{get; set;}
Public moretable () {
Table1 = new list<table1> ();
Table2 = new list<table2> ();
}
Similar to this, you can access data from multiple tables.
ASP. NET MVC Project encounter problems and solutions----AJAX Request 500 error, request multi-table data