Is it possible to have a c# file act as a code behind file for an infopath form? Just like you do for forms in aspx. Especially I would like to be able to execute code on page_load for an infopath form and pre populate or modify the fields.

Is this possible?

1 Answer 1


For browser-based Infopath forms (the ones requirng Infopath Forms Services of entrprise/paid Sharepoint Server) the custom code is impossible.

The custom (C#, VB.NET) code is possible for client (Infopath Filler 2010) forms.
And kind of, code-behind, since these forms cannot be rendered in a browser.
And rather as plugin code to black-box infopath Filler internals but not of the forms themselves.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.