Powerful gridview Display Based on jquery's Ajax

Source: Internet
Author: User

Let's take a look at this example. This has always been what I want to do.
First, the following figure is displayed:

Use northwind data. Click the plus sign to display the detailed orders of other products, and the number of orders for each product is displayed. Click '+:

First, analyze its implementation:

The first graph is displayed as a gridview. When you click '+' in front of each record, a web method is called using jquery's Ajax function and the ID of the current product is transmitted, A class that inherits usercontrol is defined. It can add an ascx file and define a view State field in this class.

When you click "+", use jquery to display this ascx file in the slideshow () of the current product. How does one transmit the ID? The view State is used.

There are many introductions about view State. I have never used it. Here we will briefly describe its relationship with a web control:

The following is an exampleCode:

This is the product's gridview.

Then the web method:

Control class:

Customerorder. ascx code:

The Ajax code that calls the web method is as follows:

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.