Using the server-side object model, writing a program to manage the SharePoint list is the core of SharePoint. The server object model is one of the ways to interact with the list. You can create different types of applications on the server to interact with the server object model. For example, WinForm, WPF/Web parts, or even Event aggreger. 1. Open VS as an administrator, create a new project WPF application, make sure to select. NET Framework 3.5, name it WPFSPTestApp, and click OK. 2. Add Microsoft. SharePoint. dll reference and click OK. 3. Add controls. The corresponding MainWindow. xaml code is:
4. Double-click the Exit button to add the Code:
5. Double-click the Clear button to add the Code:
6. Add references to the MainWindow. xaml. cs file.
7. Add 5 class-level variables.
8. Double-click the Load button to add the Code:
All the code is as follows: 9. F5 debugging. Enter similar product information.
10. Open the site and navigate to the Products list. The update is displayed. Vc/CwdDOysziCjxpbWcgc3JjPQ = "http://www.2cto.com/uploadfile/Collfiles/20140617/2014061708595793.png" alt = "\">
Modify project properties