Friday, June 28, 2013

How to Display SharePoint Control in Display Mode in List Edit Page

I am facing the problem in which I need to display the SharePoint List Field in "Display" mode in List Edit Page. (This Problem works with SharePoint Default generated Page)Step-1 : First of all please download the JavaScript file from here.Step-2 : Add this JavaScript file in your project StyleLibrary.Step-3 : Now Open your List Default Edit Page.Step-4 : Find PlaceHolderMain tag. and after this tag insert you desired code as below:<script type=text/javascript>function...

Wednesday, June 19, 2013

Custom Code for send Mail in SharePoint using C# .net code

Create new project in Visural Studio create new Project by following the below step:File -> New -> Project -> Visual C# -> Windows in Installed Template -> Select Console Application. Give your desire name to the application.Add Following Reference in your code:Microsoft.SharePointAdd Following Name Space in you code:using Microsoft.SharePoint;using System.Net.Mail;Replace Program.cs code with below code:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net.Mail;using Microsoft.SharePoint.Administration;namespace...

How to check current user in particular group in JavaScript using SPServices

Add two JavaScript file in your Style Library.1. Javascript 1.7.1.js (Download from here)2. jquery.SPServices-0.7.1a.min.js (Download from here)<script type="text/javascript" src="/Style%20Library/js/jquery-1.7.1.min.js"></script><script type="text/javascript" src="/Style%20Library/js/jquery.SPServices-0.7.1a.min.js"></script><script language="javascript" type="text/javascript">$(document).ready(function () {                $().SPServices({           ...

Tuesday, June 18, 2013

Using PowerShell to deploy SharePoint Solutions and Features

The STSADM command line application worked well with previous versions of SharePoint. But the world is progressing and PowerShell will be the new administrative tool for SharePoint. In previous articles, I already showed some amazing powerful scripts that otherwise would require more lines of code. PowerShell offers some great advantages in large farms, as they can be run remotely on target machines, can be signed and therefore be controlled. Building up a repository of scripts or cmdlets to execute common tasks would be worthwhile in the long...

Friday, June 14, 2013

How to access user profile in Windows SharePoint Services + jquery

How to retrieve the SharePoint User profile in jQuery with use of SPServices.Use below function for fetching the user information in jquery.function getUserInfo(UserId){wsBaseUrl = '/_vti_bin/';var uiObj = {};if(typeof(UserId)=="undefined" || UserId=='')UserId = _spUserId;var arrOfFields = ['ID', 'Name', 'Title', 'EMail', 'Department', 'JobTitle', 'Notes', 'Picture','IsSiteAdmin', 'Created', 'Author', 'Modified', 'Editor', 'SipAddress', 'Deleted'];var item = getItemById('UserInfo',UserId,arrOfFields);    if(item != null){  ...

Tuesday, June 11, 2013

The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)

This problem is caused when another application runs on default port i.e. :80.Most probably this issue occur because of Skype.You can find the application which is running on that particular port by following command:Open command prompt as administrator mode and type following command:netstat -anoThis command list the process running on particular port. Please close that application and start your website from iis manager.Now, You can able to access it as previous...