RSS

Monthly Archives: March 2009

Debugging tips for SharePoint


Here is a nice article about debugging in SharePoint. Worth read….

http://blog.thekid.me.uk/archive/2007/07/25/debugging-tips-for-sharepoint-and-wss-exceptions.aspx

Here is another tip for hiding “An unexpected error has occurred” message

Replace  web.config, by modifying the line…

<SafeMode MaxControls=“200“ CallStack=“false“…

to…

<SafeMode MaxControls=“200“ CallStack=“true“…

You will also need to set custom errors to ‘Off’ .

You will no longer see the “An unexpected error has occurred” error page and instead you get a lovely ’standard ASP.Net error page’ with the stack trace and everything…development has got that little bit easier!!

Advertisements
 
Leave a comment

Posted by on March 30, 2009 in Debugging, Error

 

Internet presence scenario (Office SharePoint Server 2007)


If you are planning to implement an internet edition of MOSS 2007 ….here is an exclusive article i found on Microsoft site about Office SharePoint Server 2007 Internet presence scenario. here is the link

http://technet.microsoft.com/en-us/library/cc950780.aspx

 
Leave a comment

Posted by on March 30, 2009 in Development, Internet

 

Tags:

Understanding Field Controls and Web Parts in SharePoint Server 2007 Publishing Sites


A smart topic to learn the details of Microsoft Office SharePoint Server 2007 field controls and Web Parts and how they differ, and best practices for when to use each type of control.

Author: Andrew Connell, Andrew Connell Inc. (Microsoft MVP)

MSDN link: http://msdn.microsoft.com/en-us/library/dd571480.aspx

Contents

Download the code samples that accompany this article: Windows SharePoint Services 3.0 Content Editor Web Part Link Fixup and Prohibit Content Editor Web Part.

 
Leave a comment

Posted by on March 22, 2009 in Development, Webpart

 

Sharepoint 2007 CSS reference chart


Whenever i think about designing i always step into Heather Solomon’s Blog. I am a big fan of Heather Solomon for sharepoint designing stuffs. recently i have found an interesting stuff which is very useful for a sharepoint UI designer….The CSS reference chart…

Pleas have look here…  http://www.heathersolomon.com/content/sp07cssreference.htm

Enjoy!

 
 

Tags: ,

How to show Outlook INBOX & TASK in sharepoint sites?


Add a Content Editor Webpart  (CEWP) to page and paste the below code.

Inbox

<OBJECT classid=”CLSID:0006F063-0000-0000-C000-000000000046″

 width=”100%”>

  <param name=”Folder” value=”Inbox”>

</OBJECT>

 

Tasks

<OBJECT classid=”CLSID:0006F063-0000-0000-C000-000000000046″

 width=”100%”>

  <param name=”Folder” value=”Tasks”>

</OBJECT>

This is not a perfect solution for showing inbox in portal but a quick and simple tip….Enjoy!

Voila!

 
Leave a comment

Posted by on March 22, 2009 in Code Snippets, Tips & Tricks, Webpart

 

Tags: , , ,

Flash Webpart Source Code


Note: Use this code @ your own risk.

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.ComponentModel;
namespace FlashWebPart {
   public class FlashWebPart : WebPart {

         private int flashWidth;
         private int flashHeight;
         private string flashUrl;

         [Personalizable(PersonalizationScope.Shared),
         WebBrowsable(true),
         WebDisplayName(“Width”),
         WebDescription(“Width of the flash”),
         Category(“Configuration”)]
         public int FlashWidth
         {
               get { return flashWidth; }
               set { flashWidth = value; }
         }

        
         [Personalizable(PersonalizationScope.Shared),
         WebBrowsable(true),
         WebDisplayName(“Height”),
         WebDescription(“Height of the flash”),
         Category(“Configuration”)]
         public int FlashHeight
         {
               get { return flashHeight; }
               set { flashHeight = value; }
         }

        
         [Personalizable(PersonalizationScope.Shared),
         WebBrowsable(true),
         WebDisplayName(“URL”),
         WebDescription(“Url of the flash file”),
         Category(“Configuration”)]
         public string FlashUrl
         {
               get { return flashUrl; }
               set { flashUrl = value; }
         }

         protected override void Render(HtmlTextWriter writer)
            {
                  if (!String.IsNullOrEmpty(FlashUrl))
                  {
                        string outHTML = “<OBJECT classid=\”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\” ” + “codebase=\”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,12,36\” ” + “WIDTH=” + flashWidth + ” HEIGHT=” + flashHeight + “> ” + “<PARAM NAME=movie VALUE=\”” + flashUrl + “\”> ” + “<PARAM NAME=WMODE VALUE=\”Transparent\”>” + “<PARAM NAME=quality VALUE=high> ” + “<EMBED src=\”” + flashUrl + “\” quality=high wmode=\”transparent\” WIDTH=\”” + flashWidth + “\” HEIGHT=\”” + flashHeight + “\” TYPE=\”application/x-shockwave-flash\” PLUGINSPAGE=\”http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\”></EMBED> ” + “</OBJECT>”;
                        writer.Write(outHTML);
                  }
                  else
                  {
                        writer.Write(“Modify Webpart to add content URL”);
                  }
            }
   }
}

 
Leave a comment

Posted by on March 22, 2009 in Development, Webpart

 

Tags: ,

How to change sharepoint button text on runtime?


Did you ever tried to change the text of sharepoint button using sharepoint designer. for eg: i had a requirement to change the “FINISH” to “SUBMIT” of Survey dataview webpart….i have tried to update directly from sharepoint designer but was a failure…..finally i got the below code …

try this….
Open your page in sharepoint designer. checkout the requiredd page and paste below code… and update your text…

<script>
var x=document.getElementsByTagName(“input”);
for (var i=0;i<x.length;i++)
  {
  if (x.item(i).type==”button”&&x.item(i).value==”Finish”)
     {x.item(i).value = “Submit”};
  }
</script>

 

Tags: