Databases Reference
In-Depth Information
9.
Place two buttons (with texts Create Folder and List Folder Contents )
on Default.aspx , and add the following code to Defautl.aspx :
Imports RS_SPExecution.hodentekwin7_SP2010
Imports Microsoft.SqlServer.Server
Imports System.Web.Services.WebService
Public Class _Default
Inherits System.Web.UI.Page
'declare items for referencing
Dim folder As New hodentekwin7_SP2010.CatalogItem
Dim svc As New ReportingService2006
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
End Sub
Protected Sub Button1_Click(sender As Object, e As EventArgs)
Handles Button1.Click
'creates a new folder in the Documents folder on the site,
hodentekwin7
svc.CreateFolder("April3", "http://HodentekWin7/Documents/
FirstFolder")
End Sub
Protected Sub Button2_Click(sender As Object, e As EventArgs)
Handles Button2.Click
'some folder properties are explored
svc.Credentials = System.Net.CredentialCache.
DefaultCredentials
folder.Path = "http://HodentekWin7/Documents/FirstFolder"
'number of folders in FirstFolder
Dim i As Int16 = svc.ListChildren(folder.Path).Count
MsgBox(i)
'names of last and first folders and a date
MsgBox(svc.ListChildren(folder.Path).Last.Name & vbCrLf
& svc.ListChildren(folder.Path).First.Name & vbCrLf & svc.
ListChildren(folder.Path).First.CreationDate)
End Sub
10. Build the project. Right-click on Default.aspx and then View in Browser .
 
Search WWH ::




Custom Search