Obtain the primary key of a table record.

Source: Internet
Author: User

Click the row or batch column in the table with mouse to obtain the primary key value of the record. In ASP. net mvc applications, there is no way to find record key values like ASP. NET Data controls, such as the GridView, DataList, and Repeater controls.

In the following example, Insus. NET demonstrates how to obtain the primary key of a table record.

Example of opening previous exercises:

First, let's demonstrate it. Click any column in the row to obtain:

 

Real-time Demonstration:



If we want to obtain the primary key value of a record only by clicking the first column, that is, specify to click a column. In this case, let's change the jQuery code:

 

Take a look at the real-time demonstration after the change:



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.