Use the objectdatasource Data Control in ASP. NET to insert a new record.

Source: Internet
Author: User

Finally, we have completed the combination of the gridview and objectdatasource. if you want to delete it, You can delete it. If you want to modify it, you can modify it. the result is deleted. oh, oh. not entered. this is not acceptable. you cannot enter data in the database. well. in this case, use objectdatasource to implement certain input.

Create an interface first

Oh. Does the added interface need to create a table as before? What do you mean by that.

Here I use

The first detailsview here

However, it is read by default. How can this problem be solved.

Set this attribute to insert

This is the same as above.

In the next step, you can bind your detailsview to the objectdatasource associated with the gridview. Because we have already completed the insert method, we can directly use it here.

Http://www.cnblogs.com/Lileltp/archive/2008/09/05/1285180.html

Similarly, you can use formview to implement the input content here.

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.