Saturday, August 6, 2016

Setting up Angular 2..

You may head to Angular official guide to getting started but some things might be missing there which I covered here.

Q: Latest Node installed but not  the latest npm.
A:  npm updates itself to latest
If windows use
       npm install npm -g
Other use 
       sudo npm install npm -g


Q:install typing error
A: make sure you run npm as administrator and run below commands
  • Typings: npm install -g typings
  • Tsd: npm install -g tsd
and then use
npm run typings install
and below command in case your previous npm install failed
npm install

Q:unable to compile typescript code in Visual studio code
A: The TypeScript compiler does have to be manually installed using npm install -g typescript.



Sunday, July 17, 2016

SQL Hacks

1) make self admin sql express script. Just download and run the below script

2)SSRS Deployment Script

Friday, March 18, 2016

Angular 2 posts

1. The following are examples for the core fundamentals of Angular 2. Click the button to view each sample in a plunker. - from John Papa   (

Saturday, December 26, 2015

Grunt / Bower / NPM for Visual Studio

What is Grunt/ Gulp / NPM?
You may refer "An Introduction to Bower, Grunt and Gulp" Section at this article

NPM (Node package manager) is useful to manage UI packages.

How do i install them 
Follow the Steps in here

Opps! I  don't see gulp working 
If you get the below error

"Error:Failed to load   <your project location>\gulpfile.js"...
'gulp' is not recognized as an internal or external command, operable program or batch file."

Solution: We need to install gulp  --> which needs npm ( node package manger)

Step 1: Download & Install node.js in your the system.

Step 2:  Next Goto All Programs -> Node.js -> nodejs Command promt

Step 3:  run the below command to install gulp
npm install gulp -g

Note: you might face issues trying to install using npm if behind a proxy for which you may these solutions

Can I integrate it with my Online hosted Builds

Oh! Yes Have a look at here

Thanks for visiting the post. 

Hope this helps you!

Thursday, August 8, 2013


1. How to align two elements on the same line without changing HTML

Using display:inline-block
#element1 {display:inline-block;margin-right:10px;} 
#element2 {display:inline-block;} 


Monday, July 22, 2013

Various options to store your SharePoint Solution’s Configuration Data.

The various options are : -
  1. Code
  2. web.config
  3. SharePoint List
  4. External Data Source
  5. Property Bag - 
  6. Hierarchical Object Store

1. - Good one with comparison. Do read the comments.

2. Hierarchical Object Store in SharePoint 2010 - more info on how to use the same.

Wednesday, July 3, 2013

Sharepoint 2010 Events

New Events in SharePoint Foundation 2010
Two new Add events have been provided for SharePoint lists – that is, for SPList objects:

In addition to these Add events, two Delete events have also been added to SharePoint lists:

New events on Sharepoint Sites

New Synchronous After Events
The default synchronization behavior is synchronous for before events and asynchronous for after events. Also available is a new property on the SPEventReceiverDefinition base class called Synchronization. This property has get and set methods to retrieve and set the SPEventReceiverSynchronization enumeration value. This enumeration provides a value called Default to support backward compatibility.

New Event Binding Functionality in SharePoint Foundation 2010
The ability to bind events at the scope of the site collection (SPSite), as well as giving you the ability to bind XML event receivers that are scoped to the individual site (SPWeb).

SPSite-Level Binding
   SharePoint Foundation 2010 supports an SPSite-level event receivers collection. Like other event receiver collections, this one accepts bindings from SPWebEventReceiver, SPListEventReceiver, and SPItemEventReceiver objects. All of these event types can be scoped to the site collection level (that is, SPSite). However, an SPEmailEventReceiver object does not work at the site collection level because the way that this object is implemented.

SharePoint Foundation 2010 supports binding XML event receivers at the scopes of both SPWeb and SPSite instances by using the <Receivers> tag. When a SharePoint Feature is scoped to the site collection level, a <Receivers> tag is potentially ambiguous. The tag can indicate either site-wide event binding or event binding for the top-level site. Note, however, that the default behavior is to scope to the site level. Therefore, when you scope a Feature to the site collection level, use the attribute named Scope to specify the intended scope.

SharePoint Foundation 2010 supports event binding based on the SPItemEventReceiver event receiver by using semantics of the ListTemplateId property. This approach creates an event receiver definition that is scoped to the list as the list is created. SP supports event binding that is based on the SPItemEventReceiver object in the XML of a specified content type.

SP provide the identity (ID) of the originating user and then let the event receiver implementer respond as appropriate.
SharePoint Foundation 2010 also introduces a new property called OriginatingUserToken on the SPEventPropertiesBase class that
returns the ID of the originating user.

 Event code should check for this user by ID, and, optionally, perform behaviors that can potentially cause unexpected effects by using an impersonated site collection with the token of that originating user.

In some scenarios, for example, when an active workflow has code that is running with elevated privileges, the code runs in the context of the system account. But in this scenario, when event receiver code needs to run with the credentials of the originating user, SharePoint Foundation 2010 allows you to undo the reversion using the above feature.

Redirect to URL in SharePoint Foundation 2010

Microsoft SharePoint Foundation 2010 now allows event receivers to provide a redirection URL to provide custom messages through the user interface (UI). The redirect URL feature works with all pre-event receiver types (such as SPWebEventReceiver, SPListEventReceiver, and SPItemEventReceiver) in cases where the action is being cancelled. To support the new user interfaces, SharePoint Foundation 2010 added the CancelWithRedirectUrl field to values in the SPEventReceiverStatus enumeration  (values -CancelNoError,    CancelWithError,    CancelWithRedirectUrl,    Continue ). CancelWithRedirectUrl allows you to specify a redirect URL for a Web browser UI. Use the URL that is specified by the RedirectUrl property of the SPEventPropertiesBase object to navigate to alternate pages. This URL should be a server-relative URL, and cannot contain ECMAScript (JavaScript, JScript).