Erudition

Known facts, ideas, and skill that have been imparted

December, 2007

  • Erudition

    Calling a WCF service from Infopath

    • 1 Comments
    Recently I got into a scenario where I wanted to call a WCF service from within an Infopath Form service, Infopath does not supports configuration files so my service was not able to pick the Binding and Endpoint setting for the Service at the client...
  • Erudition

    Creating a new document in a Document Library

    • 1 Comments
    string _siteUrl = " http://localhost "; using (SPSite _site = new SPSite(_siteUrl)) { using (SPWeb _web = _site.OpenWeb()) { SPFolder _folder = _web.Folders["<Document Library Name>"]; _web.AllowUnsafeUpdates = true; _folder.Files.Add("Contoso...
  • Erudition

    Code Snippets for common operations

    • 2 Comments
    1. read all the contents of a File string output = File.ReadAllText(<FilePath>); 2. Write contents to a File File.WriteAllText(<FilePath>,Encoding); 3. Convert String to Byte Array byte[] buf = System.Text.Encoding.<Encoding>...
Page 1 of 1 (3 items)