Friday 25 March 2011

Create Azure asp.net site using Web Role

Create new project using Cloud Template (Windows Azure Project)


Press OK wizard will show you different types of roles, seleect ASP.NET Web Role and add


Press OK


Wizard has created a Project which has Azure Cloud Web Role


When you press F5 or start debug, you'll notice Windows Azure Emulator on your taskbar.


Right click and select Show Compute Emulator UI


You'll be able to see your project being executed


Not much to do here :) just add your files and you are good to go.

Monday 7 March 2011

Create Event Handler in SharePoint with Visual Studio 2010

Working with the new Visual Studio 2010 has become so easy that even I can write my own event handlers within no time. Traditionally you'll go thru alot of pain of writing classes, creating features, and then deploying and activation of those features.

here you go in simple steps:

first create new project, by selecting the SharePoint Event Receiver project type.


Enter the site for debugging your code and select deploy as a farm solution



Select the List Item Events type, for Announcements (e.g.) for an item is being deleted


Write your code to handle whatever you want to achieve.


You can build the project, or just simply deploy it to your site if you are sure there are no errors.



Now sit back and relax Visual Studio 2010 will do all the work for you, and deploy the project into correct areas and do whatever is required to be done such as snk, .wsp, web.config, feature activation etc etc.


Now the moment of truth, i'll try to delete an announcement from my site 


and there you go the code has worked, (i don't know how hahaha)





if you notice in your project you had an xml file Elements.xml it has a ListTemplateID="104", here is the list of all id(s) which you might need.

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
109   Picture library
110   Data sources
111   Site template gallery
112   User Information list
113   Web Part gallery
114   List template gallery
115   XML Form library
116   Master pages gallery
117   No-Code Workflows
118   Custom Workflow Process
119   Wiki Page library
120   Custom grid for a list
130   Data Connection library
140   Workflow History
150   Gantt Tasks list
200   Meeting Series list
201   Meeting Agenda list
202   Meeting Attendees list
204   Meeting Decisions list
207   Meeting Objectives list
210   Meeting text box
211   Meeting Things To Bring list
212   Meeting Workspace Pages list
301   Blog Posts list
302   Blog Comments list
303   Blog Categories list
1100   Issue tracking
1200   Administrator tasks list

Friday 4 March 2011

GUID Generation

If you want to create a GUID for your project follow the procedure.


  1. Open the Visual Studio .NET Command Prompt.

    In the Program Group for Visual Studio .NET, point to Visual Studio .NET Tools and choose Visual Studio .NET Command Prompt. A command prompt will be displayed. This special command prompt window allows you to access tools for Visual Studio.
  2. Launch the GUID Generator.
    At the command prompt, enter the following:

    guidgen

    The Create GUID utility will appear.
  3. Specify the type of GUID to generate.
    The Create GUID utility can generate GUIDs in several forms. For Business Portal integrations, GUIDs must be in the Registry format.
  4. Generate and copy the GUID.
    To generate a new GUID, click New GUID. To copy the GUID to the clipboard to use in your integration, click Copy.