ASP.net 2.0 Advanced data processing control events

Source: Internet
Author: User

In the previous section, you have seen several examples of data control events. The events for the data control are provided to you at the appropriate time of the page execution lifecycle for you to insert custom code. In general, data controls expose events before and after a particular operation occurs. The name of an event that is invoked before an operation typically has a-ing suffix, and the name of the event that is invoked after an operation typically has a-ed suffix. For example, the events supported by the GridView include:

· Pageindexchanging and PageIndexChanged-raised before and after paging operations

· Selectedindexchanging and SelectedIndexChanged-raised before and after the selection operation occurs

· Sorting and sorted-raised before and after the sort operation

· Rowediting and Rowcancelingedit-raised before the data row enters edit mode or when edit mode is terminated

· RowUpdating and RowUpdated-raised before and after the update operation

· RowDeleting and rowdeleted-raised before and after the delete operation

· RowDataBound-When data rows are data-bound, raised

· RowCreated-raises when data rows are established and displayed

· Rowcommand-invokes the internal control's button command when the

Data source controls also expose events similar to events in data-bound controls. The SqlDataSource and ObjectDataSource controls support the following events:

· Selecting and selected-raised before and after the selection operation

· Updating and updated-raised before and after the update operation

· Deleting and deleted-raised before and after the delete operation

· Inserting and inserted-raised before and after the insert operation

· Filtering-raises before the filter operation occurs

It also provides additional events when the object specified by the TypeName property of the ObjectDataSource control is created or destroyed. You can set the custom object in the ObjectCreating event by setting the ObjectInstance property that is passed with the event arguments.

· ObjectCreating and objectcreated-raised before and after the object is built

· Objectdisposing-Raised before object is destroyed

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.