Attachments in Infopath and encoding attachments using C#

Asked By 0 points N/A Posted on -
qa-featured

Where do I find form attachments in Info path? How do I then encode attachments using Visual C#?

SHARE
Best Answer by honey.garg
Best Answer
Best Answer
Answered By 0 points N/A #110617

Attachments in Infopath and encoding attachments using C#

qa-featured

Insert a file attachment management in ms info path 2007:
Place the indicator wherever you would like to insert the management in an exceedingly blank template.
Click additional Controls on the Insert menu.
In Insert controls, click File Attachment.
To add a label to the management, kind text on top of or to the left to the management, followed by a colon.
Users will attach any form of file to the shape, except files like .exe files. To limit the categories of files that users will attach to their forms, do the following:

        1. Double-click the file attachment management.

        2. Click the info tab.

        3. Under Validation and Rules, choose the enable the user to connect solely the subsequent file sorts' check box, and    then, in the box, kind of the file extensions for the file sorts whom you simply need to permit.

        6. To show a default file attachment within the management rather than the placeholder text, do the following:
Double-click the file attachment management.
Click the info tab.
Under Binding, click specify a default file, then click Browse.
In the Attach File panel, choose the file that you simply need to seem within the file attachment box on the shape templet, then click Insert.

Encoding
Start Microsoft Visual Studio. NET 2003 and save the file by the name of AttachmentEncoding.
In the Microsoft workplace Project Wizard, click produce a replacement kind templet, then click end. The Microsoft workplace Project Wizard creates a replacement Visual Studio. NET 2003 project that's named AttachmentEncoding. AN InfoPath kind template is additionally created. The InfoPath kind template is known as AttachmentEncoding.
In answer soul, right-click AttachmentEncoding, purpose to feature, then click Add New Item.
In the Add New Item panel, click category within the template pane, kind InfoPathAttachmentEncoder.cs within the Name box, then open.
Replace all the code within the InfoPathAttachmentEncoder.cs file with the subsequent code within the attachment.

Answered By 0 points N/A #197491

Attachments in Infopath and encoding attachments using C#

qa-featured

Hi,

You need to take care of following points if you want to properly encode and decode the file attachments programmatically by using the visual c#. You need to encode and decode the file attachments in C#. For that you need to create the encoder and the decoder class. You need to create a form that includes a visual c# project. Then create the encoder class as well as the decoder class. Then modify the form to call the code. Finally test the code for final performance. 

You have to code and encode the the encoder and the decoder class. You need to include the set level of codes. Include that in each of the encoder and the decoder class. That's it. You will be able to attach the forms in the infopath. 

Waters Magner

Login/Register to Answer

Related Questions