Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
WebDAV .NET
>
Tutorial
> Set XML property
This example shows you how to set property defined as XML string.
C# example
using System; using System.Net; using Independentsoft.Webdav; namespace Sample { class Program { static void Main(string[] args) { NetworkCredential credential = new NetworkCredential("username", "password"); WebdavSession session = new WebdavSession(credential); Resource resource = new Resource(session); string xml = "
WebDAV .NET
" + "
1.0
01.01.2005
"; Property myProperty = new Property(xml); resource.SetProperty("http://myserver/dav/file1.dat", myProperty); } } }
VB example
Imports System Imports System.Net Imports Independentsoft.Webdav Namespace Sample Class Module1 Shared Sub Main(ByVal args() As String) Dim credential As NetworkCredential = New NetworkCredential("username", "password") Dim session As WebdavSession = New WebdavSession(credential) Dim resource As Resource = New Resource(session) Dim xml As String = "
WebDAV .NET
" & _ "
1.0
01.01.2005
" Dim myProperty As Independentsoft.Webdav.Property = New Independentsoft.Webdav.Property(xml) resource.SetProperty("http://myserver/dav/file1.dat", myProperty) End Sub End Class End Namespace
Need help? Ask our developers:
Name*
Email*
Message*