Monday, November 30, 2009

Accept mail and create an item in Document Library

This feature allow us to add a new item in a document library by sending an email to the specified email address.

Go to Document Library Settting -> Incoming mail setting(Under communication tab)

Really good one!!

Help Link :
http://blogs.msdn.com/selvagan/archive/2008/01/26/incoming-email-configuration-moss.aspx






Application page with UnsecuredLayoutsPageBase

Sharepoint site with secure socket layer (Https) requires to be inherited with "UnsecuredLayoutsPageBase"

See the code sample given below:


public class Class1 :UnsecuredLayoutsPageBase
{
protected Label lblSiteTitle;
protected Label lblSiteID;
protected DropDownList DropDownList1;
protected override void OnLoad(EventArgs e)
{
SPWeb site = this.Web;
lblSiteTitle.Text = site.Title;
lblSiteID.Text = site.ID.ToString().ToUpper();
}
protected void Button_Click(object sender, EventArgs e)
{
Response.Write(DropDownList1.SelectedValue);
}
}

Get List Data using SPView

Check code snippet:

SPWeb spWebTest = siteCollection.RootWeb.Webs["Test"];
SPList splTestDetails = spWebTest.Lists["TestTeam"];

//Get the Test person names from Test site
SPView spvTestPerson = splTestDetails.Views["TestPerson"];

DataTable dtTestPerson = splTestDetails.GetItems(spvTestPerson).GetDataTable();

SpDisposeChecker tool - check memory leak in sharepoint



http://code.msdn.microsoft.com/SPDisposeCheck


Another good one for .Net : http://msdn.microsoft.com/en-us/library/ee658248.aspx

Thursday, November 19, 2009

Few very useful paths for sharepoint professionals

  1. 12 hive
  2. Assembly
  3. WSS for Web.config changes
  4. <%@ Assembly Name="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral,PublicKeyToken=71E9BCE111E9429C" % >

Friday, November 13, 2009

Flash in Sharepoint

Use content editor webpart.
Use following code for source of CEWP

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" id="worldtime" align="middle">

<param name="allowScriptAccess" value="servernamesharepoint" />

<param name="movie" value="http://servernamesharepoint/Test/TestDoclib/flashslide.swf" />

<param name="quality" value="high" />

<param name="bgcolor" value="#ffffff" />

<embed src="http://servernamesharepoint/Test/TestDoclib/flashslide.swf" quality="high" bgcolor="#ffffff" name="worldtime" align="middle" allowScriptAccess="servernamesharepoint" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

</object>