Tags » Infopath

Extracting Attachment from InfoPath form using C#

The sample code for extracting attachment from submitted InfoPath form

var lstTimeSheet = new List<RelatedTimesheet>();
 foreach (var timeSheet in invoiceFormData.Summary.Timesheet)
 if (timeSheet.Attachment != null)
 var tSheet = new RelatedTimesheet();
 var b = timeSheet.Attachment;
 var nameBufferLen = b * 2;
 var fileNameBufffer = new byte;
 for (var i = 0; i < nameBufferLen; i++)
 fileNameBufffer[i] = b;

 var charFileName = Encoding.Unicode.GetChars(fileNameBufffer);
 var fileName = new string(charFileName);
 tSheet.FileName = fileName.Substring(0, fileName.Length - 1); 

 var fileContent = new byte;
 for (var i = 0; i < fileContent.Length; i++)
 fileContent[i] = b;

 tSheet.Attachment = fileContent;
… 21 more words

InfoPath is here to stay

It looks like something rose from the dead.

As SharePoint MVP Vlad Catrinescu noticed on his blog, Microsoft had updated the blog post on the future of InfoPath and SharePoint Forms. 95 more words

InfoPath is back from the dead...sort of.

As you may or may not know, InfoPath has been the subject of much speculation in the SharePoint community, with Microsoft saying that they will be killing it off, then changing its mind about it. 177 more words

Microsoft Sharepoint

Using HTML Tags for formatting in InfoPath Rich Text Box Control


We had a requirement to format custom error messages that we were displaying in the rich text box control inside InfoPath Form.

For this we can use AppendChild method of XPathNavigator object. 103 more words