Thursday, May 17, 2012

Copying users from one SharePoint group to another



Although SharePoint doesn’t provide any out of the box approach to move users from one SharePoint group to another, this can be achieved by writing code to iterate through all users in a source group and add them to destination group.

Below mentioned is a workaround to copy users across groups without any code.
(One pre-requisite to use this approach is the users email addresses have to be associated with their LAN ID’s in the active directory)

1.       Click on People and Groups.
2.       Go to the group from which you want to copy users.
3.       From the group page, select the required users (or all users) and then from Actions Menu, choose "Email Users" as shown below.

4.       Once you selected "E-Mail Users" then your default email program (Ex: Outlook) will be open with all email addresses.
5.       Select all email addresses and copy them.
6.       Navigate to SharePoint site and then go to SharePoint group to which you want to add users.
7.       From the toolbar, select "New" and then "Add Users". 
8.       From the add users page, paste all email addresses and then click "Check names" icon for validation.
9.       Click OK button to save the changes.

Thus all the users are copied across to the destination group.

Wednesday, May 16, 2012

ASP.NET MVC Razor and jQuery


These are my thoughts, learnings and insights from the ASP.NET MVC Razor and jQuery session at the GIDS .NET 2012 in Bangalore.

Speaker - Ido Flatow (Senior Architect – Sela Group)
ASP.NET MVC is a new framework for building web applications using the power of ASP.NET.
MVC is all about
·         Clear separation: Model, View, Controller
·         Making testing easier and comprehensive
·         Giving full control over HTML and JavaScript
·         Using friendly URLs
Page life cycle of MVC
What is Razor?
Many ASP.NET Web pages have C# or VB code blocks in the same place as HTML markup. In some occasions this combination is uncomfortable for writing and delimiting code. To deal with that problem, Razor was designed as an easy to learn, compact and expressive view engine that enables a fluid coding workflow.
Razor is not a new programming language itself, but uses C# or Visual Basic syntax for having code inside a page without ASP.NET delimiter: <%= %>. Razor file extension is ‘cshtml’ for C# language, and ‘vbhtml’ for Visual Basic.
Examples:
@’ is the magic character that precedes code instructions.
A single code line inside the markup:
Current time is: @Datetime.Now
What is jQuery? It’s Fantastic!
ü Fast and concise JavaScript library
ü Simplifies your code
o    DOM traversing
o    Event handling
o    Animation
o    Ajax interaction
ü Included in ASP.NET 4 project templates
ü Cross browser (IE/FF/Safari/Opera/Chrome)
ü Extensible through plugins
ü Write less, do more!
ü It just works!
Interesting fact – around 42% in the world use jQuery compared to its competitors
There is lot more to know and appreciate of these tools and technologies which I’ll try to cover in my upcoming blogs. Here I wrap up the topic with a comparison of ASP.