object reference. objective how to work with objects in sharepoint by using classes?
TRANSCRIPT
![Page 1: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/1.jpg)
OBJECT REFERENCE
![Page 2: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/2.jpg)
Objective• How to work with objects in SharePoint by using classes?
![Page 3: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/3.jpg)
Learning Method• Help yourself and help your friends next to you.• You must address the bug by yourself.• I give you frequent bugs that allows you to know the point
to fix.• Lessons are designed to increment the content on the
previous lessons.
![Page 4: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/4.jpg)
Lecture Step• Explain objective of the lab.• Explain related class.• Do the lab. Writing the code.• Point out the frequent bug.
![Page 5: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/5.jpg)
Case Study’s Background• Office of Human Resources• It responses for
• Recruit employee• Manage salary, other benefits and tax• Check time attendance• Manage personnel development.
![Page 6: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/6.jpg)
Existing Problem• There are a large amount of document in which the office
has to handle for thousands of employees. • These documents occupied the room space.• Searching these documents, it takes time.• The university has several campuses, transporting
document use a messenger. It takes time and document may be lost or damaged in travelling.
![Page 7: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/7.jpg)
Assignment• You as an IT developer; are assigned to develop content
management system for the Office of Human Resource Management (OHRM).
![Page 8: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/8.jpg)
Design Workspace
![Page 9: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/9.jpg)
Object Name & URL
![Page 10: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/10.jpg)
Survey site collection by SharePoint Interface
• Open Vmware lab file from path:
myDocuments\KM WSS Office VS Student
![Page 11: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/11.jpg)
Create Project• Open Visual Studio
![Page 12: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/12.jpg)
Two ways of Code Implementation• Inline code• Code-behind
![Page 13: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/13.jpg)
LAB 01.01OBJECTREFERENCE
![Page 14: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/14.jpg)
Learning Objective• This lesson will learn about how to reference to objects, to
manipulate objects in the site collection by using different classes.
![Page 15: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/15.jpg)
Related Class for SharePoint Object
![Page 16: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/16.jpg)
Topic• SPSite
• Instantiate site collection object:
• SPWeb• Create web site object
• Top-level site, rootweb• Specific website• Compress form
• Enumerate all websites in site collection.
• SPList• Refer to all lists in site• Refer to specific List
• SPListItem• Refer to all ListItems in List• Refer to Folder in List
• SPField• Enumerate field name or column name in List.
• Display data in ListItem for a specific field.
![Page 17: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/17.jpg)
SITE COLLECTION
![Page 18: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/18.jpg)
• Objective: how to create site collection object.• Class: SPSite
![Page 19: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/19.jpg)
Class: SPSite
![Page 20: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/20.jpg)
Page Load event
![Page 21: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/21.jpg)
Frequent Bug• SPSite(“http://portal”) • It is ( ) parentheses. • Not [ ] bracket
![Page 22: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/22.jpg)
REFER TO SITE / WEBSITE
![Page 23: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/23.jpg)
• Objective• How to refer to Top-level site• How to refer to Site, Subsite
• Class• SPWeb
![Page 24: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/24.jpg)
Class: SPWeb
![Page 25: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/25.jpg)
Lab• Objective
• Enumerate Url of all sites in SiteCollection.• Enumerate Name of all sites in SiteCollection.
• Class• SPSite.AllWebs
![Page 26: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/26.jpg)
Loop: foreach• The foreach statement allows you to iterate through all the
items in an array or other collection, examining each item in turn.
![Page 27: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/27.jpg)
LIST OR DOCUMENT LIBRARY
![Page 28: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/28.jpg)
• Objective:• Refer to all lists in site• Refer to specific List.
![Page 29: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/29.jpg)
Lab: Enumerate all Title of Lists in site “DocCenter”
![Page 30: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/30.jpg)
Refer to specific List.
![Page 31: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/31.jpg)
LIST ITEM
![Page 32: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/32.jpg)
• Objective• Reference all ListItem in List
• Class• SPList.Items
![Page 33: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/33.jpg)
Class: SPList.Items
![Page 34: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/34.jpg)
Lab: Enumerate Filename of all ListItem in List “Profile”
![Page 35: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/35.jpg)
FOLDER
![Page 36: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/36.jpg)
• Objective:• Reference folder including subfolder.
• Class• SPList.Folders
![Page 37: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/37.jpg)
01.02ObjectReferenceDropDownList
![Page 38: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/38.jpg)
Objective• Apply object reference to controls: DropDownList, ListBox.• Page processing sequence: page postback• Filter Lists
![Page 39: OBJECT REFERENCE. Objective How to work with objects in SharePoint by using classes?](https://reader036.vdocuments.site/reader036/viewer/2022062407/56649e865503460f94b88a42/html5/thumbnails/39.jpg)
Requirement
1. When a program is loaded, the dropdownlist displays all websites in the site collection.
2. When a user selects a website from DropDownList, Lists associated under the website will display in ListBox.
3. Lists will be filtered Non-hidden list.