Quick tip: Set C# as the default programming language in Infopath

So, you’re designing your InfoPath form and as soon as you click on some field to manipulate it with code, Visual Studio comes up and you notice that the language used for your code is not the one you were going for. Well, if you were going for C# you definitely did not get what you were going for.

InfoPath code defaults to Visual Basic and the application never asks you for your preference. So, how do you change that?

Well, it’s actually a straightforward option and it resides exactly where you would have thought it would.

Click on “File”, then “Options”, then click on “More Options” under the title “InfoPath Options” and then click on the “Design” tab in the new window that opens up.

The default programming language is listed in the “Programing Defaults” section of the new window. You can even select the location where your code will be stored.

Change the defaults to your liking and click on OK. That’s all. Next time you attempt to add code to your InfoPath forms, Visual Studio will kick off with your preferred programming language.

MGR: the Intelogist

About MGR: the Intelogist

SharePoint Server developer, turned Sitefinity developer, turned Angular developer, turned SharePoint Online consultant, turned Unily consultant, turned O365 consultant... Never a dull moment!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

This site uses Akismet to reduce spam. Learn how your comment data is processed.