Tuesday, July 24, 2012

Create, Read and Erase cookies in javascript

If you are looking for creating cooking in javascript here is the article on the same which explain you how to create, Read and then Erase cookies in javascript. Click Here to see the article.

Default user profile properties (SharePoint Server 2010)

If you are looking for the list of default user profile properties that SharePoint Server provides Please refere to this link.

It shows the default user profile properties.

Referece: technet.Mocrosoft.

Thursday, July 19, 2012

Check if Page is in Edit mode Javascript

I have written javascript code in my SharePoint Page which hide some controls on the page depending on the criteria.

I want to execute this script only when page is published and my problem was this script was executed if the page is in edit mode.

I have found that SharePoint maintain this html input control which is rendering on the page when it is in edit mode

You can refer to this control in javascript and do your work accordingly.

var pageMode = document.forms[MSOWebPartPageFormName].MSOLayout_InDesignMode.value;

if (pageMode == ''){
//Page is not in edit mode

Wednesday, July 18, 2012

Get Worker Process ID associated with each Sharepoint site

If you want to know which worker process is running specific Sharepoint use folliwing commands in command prompt-

1. Start-->Run and type "cmd".

2. navigate to path "%windir%\system32\inetsrv\".

3. Type "appcmd.exe list wp".

This will show you all the worker processes running Sharepoint applications.

Retrive DLL from assembly in windows server 2008

Sometime there is requirement to retrive the DLL from the GAC but when we look at the assembly folder it looks like as shown below:

To view the available dll follow the steps

1. uninstall the dll using the following command in the run dialog box

regsvr32 -u C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\shfusion.dll
2. Now type assembly in the Run dialog box.
3. Type C:\windows\assembly\GAC in address bar.
4. You can now able to view the folders for each assembly.
5. To revert back to orginal state type following command in the run dialog box

regsvr32 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\shfusion.dll
Thanks R Manimaran for the good post .

Tuesday, July 17, 2012

Get tags for specific page from all the user.

If you are working on Sharepoint 2010 social networking feature and your are using "GetTags" method from "socialdataservice".

The problem with this method is that it retrives all the tags for specific user only.

If you want to show the how many users tagged perticular page with specific tag then this methos will not help you.

I have found a very good article which explain how we can retrieve the all the tags for a specific location/page from all users.

Click here to see the article.
Thanks Elio for this wonderful article.

Monday, July 16, 2012

Editing Page in SharePoint Designer 2010 with Yellow Marked Code

When I have tried to edit my custom page layout it won't allow me to edit it and all the contents are showing up in Yellow marked color.

In addition, the Ribbon was missing some of the tabs. After spending some time I found solution to overcome this issue.

You simple need to click on "Advance Mode" button that is located on the Ribbon and thats it.

You can now edit the page and you'll also see the other missing tabs on the ribbon.