concept visual studio in category sharePoint

appears as: Visual Studio
SharePoint 2010 Workflows in Action

This is an excerpt from Manning's book SharePoint 2010 Workflows in Action.

  • It doesn’t require Visual Studio .NET coding or expertise— As powerful as Visual Studio .NET is, it takes time to become proficient with it. SharePoint Designer 2010 requires no code but still allows for the user of common programming tools such as variables, which store data temporarily, and functions (in this case, called actions), which perform a variety of tasks. The learning curve for SharePoint Designer is much shorter than for its Visual Studio counterpart.
  • With Visual Studio ready to go, it’s time to add the code that will execute when the Amount field is changed. First, open your InfoPath form. For the expense report form created in chapter 7, navigate to the Library Settings of the Expense Reports library, and under Advanced Settings, click to edit the form template. To get started, first click the Amount field. Then, on the Ribbon under the Developer tab, click the Changed Event button. This will open Visual Studio and a new project that is linked to your form template will be automatically generated (figure 9.2). Inside the project, you’ll notice a single code file titled FormCode.cs. Within this code file are two methods, InternalStartup and Amount_Changed. Because you selected to respond to the Amount field’s Changed event, you’ll see the InternalStartup method has an event that will fire when changes occur. When a change occurs, it is handled by the Amount_Changed method.