ASP. NET MVC Project encounter problems and solutions----AJAX Request 500 error, request multi-table data

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.