C#: Why default fall-through in switch statement is not allowed?


I was working on this particular piece of logic which I saw as a multiple sieve like structure. An if-else statement which would check the value of a number and based on the value, it would also execute the code for all the values less than it.

For example, user could submit x number of projects to be processed in one request. User could add a minimum of 1 to a maximum of 5 projects in one request.

Based on the number of projects user added, I had to write a logic to check a certain value in each project form. So if user had added 3 projects, I would check project 1, 2 and 3. Continue reading

Posted in Misc | Tagged , , | Leave a comment

SharePoint 2010 State Machine Workflows with Custom Task Forms (InfoPath) using VS 2010 – Part 3 of 3


Introduction

In the Part 3 of the tutorial, I will explain the process of sending data from the workflow to the task form (InfoPath). In Part 2 of the tutorial I explained retrieving the data from InfoPath form in the workflow by using the Extended Properties of the Task Properties. We will use the Task Properties object to send the data from our workflow to the InfoPath Form.

Continue reading

Posted in Misc | 1 Comment

Template Id and Template Type mapping


In continuation of the previous post, below is the Template Type and Id mapping

Id
Template Type
100
Generic list
101
Document library
102
Survey
103
Links list
104
Announcements list
105
Contacts list
106
Events list
107
Tasks list
108
Discussion board
 
Continue reading
Posted in Misc | Tagged , , | Leave a comment

OOTB Feature and GUID Mapping


When we implement or activate an Out of the box feature in SharePoint 2010 in our code (Visual Studio 2010), it is required, that we add the Feature Id in the Elements.xml file. Following are the mapping of Features and their respective GUID

Feature Name
GUID
PublishingPrerequisites Feature
 a392da98-270b-4e85-9769-04c0fde267aa
PublishingResources Feature
 aebc918d-b20f-4a11-a1db-9ed84d79c87e
Navigation Feature
 89e0306d-453b-4ec5-8d68-42067cdbf98e
PublishingLayouts Feature
 d3f51be2-38a8-4e44-ba84-940d35be1566
AssetLibrary Feature
 4bcccd62-dcaf-46dc-a7d4-e38277ef33f4
EnhancedTheming Feature
 068bc832-4951-11dc-8314-0800200c9a66
EnterpriseWikiLayouts Feature
 a942a218-fa43-4d11-9d85-c01e3e3a37cb
Ratings Feature
 915c240e-a6cc-49b8-8b2c-0bff8b553ed3
WAReports Feature
 2acf27a5-f703-4277-9f5d-24d70110b18b Continue reading
Posted in Misc | Tagged , | Leave a comment