Three-tier Architecture Experience

Source: Internet
Author: User
1. When modifying data:
1. The class attributes should be consistent with the parameter names of the class methods.
2. The datakeynames of the gridview control should be set as the primary key of the data table.
3. For variables with a guid structure, check whether the type of the updataparameters guid parameter of updatamethod in the objectdatasource object is an object. The designer may change it to a string (possibly. net2005 bug ).
Ii. When deleting data:
1. Use the designer to create an objectdatasource object and design the corresponding methods of select and delete.
2. For the delete method, if its parameter is a guid structure, the designer automatically sets the dataobjecttypename attribute of the objectdatasource object to system. guid, and the parameter is not correctly generated in deleteparameters (collection. Required: A. Delete the system. guid attribute value of dataobjecttypename. B. Add the object type parameter named primary key to the deleteparameters parameter set.
3. When adding data:
Generally, the formview control is used to remove the edit template. Only the insert template is used, and the defultmode of formview is set to insert.

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.