Showing posts with label MOSS2007. Show all posts
Showing posts with label MOSS2007. Show all posts

Tuesday, September 28, 2010

Use SharePoint controls in Custom page - Calendar Controls

Put the code in markup file(.aspx or .ascx), on the starting of the markup.

<%@ Assembly Name="Microsoft.SharePoint,Version=12.0.0.0, Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="MySPUserControl" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>


Put the code in body of markup file.
<MySPUserControl:DateTimeControl ID="txtEstimatedCompletionDate" runat="server" DateOnly ="true" IsRequiredField="true" ErrorMessage="*" />

Wednesday, August 18, 2010

SharePoint - ProcessBatchData to improve performance

http://blog.dynatrace.com/2009/01/20/sharepoint-using-batch-updates-to-speed-up-performance/

Tuesday, July 13, 2010

"Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack."

Solution :
While running the code with RunWithElevatedprivileges,
1. SPSIte and SPWeb object should be created inside the delegate.
2. SPWeb object should be opened by giving URL explicitly. It should not open by COntextWeb method.

Friday, June 25, 2010

Very good JQuery Sample

http://www.bitsofsharepoint.com/BlogPoint/Lists/Categories/Category.aspx?Name=SP-Javascript%2FJQuery

Thursday, June 24, 2010

JQuery-SharePoint Samples

Get Data From a SharePoint list using JQuery

<%@ Page Language="C#" %>
<html dir="ltr">
<head runat="server">
<META name="WebPartPageExpansion" content="full">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled 1</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="button" value="button" onclick="test()"/>
<input type="text" id="output"/>
</div>
</form>
<script language="javascript" type="text/javascript" src=
"/_LAYOUTS/JQuery/jquery-1.3.2.min.js">
</script>
<script language="javascript" type="text/javascript" src=
"/_LAYOUTS/JQuery/jquery.SPServices-0.5.4.min.js">
</script>
<script language="javascript" type="text/javascript" src=
"/_LAYOUTS/JQuery/SPAPI_Lists.js">
</script>
<script language="javascript" type="text/javascript" src=
"/_LAYOUTS/JQuery/SPAPI_Core.js">
</script><script type="text/javascript" language="javascript">
function test()
{
// Return all items in the default view of MyList
var lists = new SPAPI_Lists('http://Test:1659/TestSite');
var items = lists.getListItems('Origin');
if (items.status == 200)
{
var rows = items.responseXML.getElementsByTagName('z:row');

$(items.responseXML).find("z\\:row").each(function()
{
var liHtml = $(this).attr("ows_First_x0020_Name") ;
alert(liHtml);
});

}
else
{
alert('There was an error: ' + items.statusText);
}
}
</script>
</body>
</html>

Monday, June 21, 2010

JQuery + SharePoint + API

http://darrenjohnstone.net/2008/07/22/examples-for-the-sharepoint-and-office-live-javascript-api/

Tuesday, June 15, 2010

JQuery to Display Image from a link

http://sharepointjavascript.wordpress.com/2010/04/29/image-preview-on-hover-over-a-hyperlink-field/

Tuesday, May 4, 2010

Attach event handler in SharePoint

SPSecurity.RunWithElevatedPrivileges(delegate()
{

SPSite sps = new SPSite("http://test:1659/");
SPWeb impersonateweb = sps.OpenWeb();
impersonateweb.AllowUnsafeUpdates = true;
SPList _spListAanwezige = impersonateweb.Lists["Survey"];
_spListAanwezige.EventReceivers.Add(SPEventReceiverType.ItemAdded,
"ReplicateData, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1f0faf7eec29149f", "ReplicateData.SurveyEventHandler");
impersonateweb.AllowUnsafeUpdates = false;

});

Can not attach workflow to Survey list.

The status of a workflow appears as "Failed to Start" when you try to start a workflow from a survey response in Windows SharePoint Services 3.0

http://support.microsoft.com/kb/926370

Tuesday, October 13, 2009

A very good link for image search in Sharepoint

http://blogs.catapultsystems.com/matthew/archive/2008/08/28/sharepoint-image-search-part-1.aspx

How to crawl the content in sharepoint search

1. Go to Central Admin--> Shared Services--> Search Settings --> Content sources and crawl schedules

2. Shared Services Administration: SharedServices1 > Search Administration > Content Sources

3. Local Office SharePoint Server sites

4. Start Full Crawl

Thursday, October 1, 2009

Single Sign On Help

http://www.thorprojects.com/blog/archive/2008/08/02/moss-single-sign-on-setup-step-by-step.aspx

Important Paths for Creating custom theme in sharepoint

SpThemes.Xml -- C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033
Theme folders -- C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES
mycustomtheme.gif - C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES

Tuesday, September 29, 2009

Increase the size of Site Template or List Templates

Run following command to the server:

stsadm -o setproperty -propertyname max-template-document-size -propertyvalue 50000000

Monday, September 21, 2009

Sharepoint Installation Help

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

Thursday, September 17, 2009

Download ifilter for Sharepoint PDF Search

http://www.adobe.com/support/downloads/thankyou.jsp?ftpID=2611&fileID=2457

Change default action of the workflow task in Sharepoint

It is good user exeprience if user can directly edit the task instead of going to View the task and then edit. or instead of going to ECB menu and then select edit item.

User should be edit the task using only single click. here are the steps to achieve this thing.:
Step1. Open master page. and put following javaScript code in the head part of the master page.
function GoToLink(elm)
{
try
{

if (elm.href==null)
return;
var ch=elm.href.indexOf("?") >=0 ? "&" : "?";
var srcUrl=GetSource();
if (srcUrl !=null && srcUrl !="")
srcUrl=ch+"Source="+srcUrl;
var editUrl, regExp;
var dispUrl = elm.href ;

regExp = /DispForm.aspx/i;
editUrl = dispUrl.replace(regExp, "EditForm.aspx");
var targetUrl= editUrl + srcUrl;

if (isPortalTemplatePage(targetUrl))
window.top.location=STSPageUrlValidation(targetUrl);
else
window.location=STSPageUrlValidation(targetUrl);
}
catch(e)
{
alert(e.description);
}
}


Step 2. Make Defer="false" in following markup code in the master page.

3. THe default action of task has been changed to edit item.

4, isnt it cool user experience??