Sunday, February 17, 2013

Adding webpart Propert using editor part and fetching list item title with styling


using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.WebControls;

using Microsoft.SharePoint;

using ZS.CodeChallenge.V1.common;

using System.Web;

using Microsoft.SharePoint.WebPartPages;

Catching and logging error in Custom code(ULS logging)


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration;

 namespace CommonCode
{
    public class ULSLogging : SPDiagnosticsServiceBase
    {
        public static string DiagnosticAreaName = "CodeChallege LOG";
        private static ULSLogging _Current;
        public static ULSLogging Current
        {
       

Tuesday, February 5, 2013

log off other user from server

1. First open Command prompt as Administrator.
2. Type command >QUSER(this will give you Session Id of all logged In Users)
3. Type command>Logoff {Sessoin ID} (It will log off user from server)

Friday, February 1, 2013

Read SecureString from user in Powershell

$aa=Read-Host "enter:" -AsSecureString


Example from powershell:-

PS C:\Users\username> $aa=Read-Host "enter:" -AsSecureString
enter:: ***

SharePoint document metadata not updating

I faced a weird issue today, Metadata for document which has lookup column was not updating even after saving the item. There was no erro...