Sharepoint - How to open a document on edit/read only mode using C# client application -
as mentioned on title, have c# application try open documents on edit mode , read mode using url. solved authentication problem. but, methods can use open docs?
namespace sp_ctx{ class program { [stathread] static void main(string[] args){ //if (args.length < 1) { console.writeline("sp_ctx <url>"); return; } string targetsite = "https://x/y/z/"; using (clientcontext ctx = claimclientcontext.getauthenticatedcontext(targetsite)) { if (ctx != null) { ctx.load(ctx.web); // query web microsoft.sharepoint.client.web web = ctx.web; var folder = web.getfolderbyserverrelativeurl(@"/a/b/c"); ctx.executequery(); // execute console.writeline(web.title); } } console.readline(); }}}
Comments
Post a Comment