Monday, March 2, 2015

Determine display mode of sharepoint page

In case you are using a team site :
    if (Microsoft.SharePoint.SPContext.Current.FormContext.FormMode == SPControlMode.Edit)
    {
        ltr.Text = "EditMode2";
    }
    else
    {
        ltr.Text = "ViewMode";
    }
in case you are using a publishing site:
if (Microsoft.SharePoint.SPContext.Current.FormContext.FormMode == SPControlMode.Display)
  {
   // your code to support display mode
  }
  else // Microsoft.SharePoint.SPContext.Current.FormContext.FormMode = SPControlMode.Edit
  {
   // your code to support edit mode
  }

Tuesday, March 12, 2013

Add Items(options)to Select box synamicaly using JavaScript

function fill()
{
   
   
    var ddl =document.getElementById("ddl");
    var arrayofMonths=["Jan","Feb","March"];
for (var i=0; i {

   
            var opt = document.createElement('option');
            opt.innerHTML = arrayofMonths[i];
            opt.value = arrayofMonths[i];
            ddl.appendChild(opt);
   
}


Above Code add items to you dropdown list Dynamically,you may use it on your HTML page like Bellow

call this J script function on click event of this button(onclick="fill()")


//
//
////


Tuesday, March 1, 2011


Indrachapa liynage "Abinishkramnaya"
This album has added on muzik page(direct download link!)

Wednesday, February 16, 2011

os Download

ඩවුන්ලෝඩ් කරගන්න ඔන OS එක උඩ CLick කරන්න













Microsoft Window xp,,Vista,7
Open Source Linux,Ubuntu
Apple Mc Os