SharePoint Development

Customization, Design, Development and Programming
How to Update Created, Created By, Modified and Modified By field?

I stumbled upon this Technet Forum post. Using the SPListItem.UpdateOverwriteVersion method, you can overwrite Created, Created By, Modified and Modified By fields. Here is a code snippet from this MSDN article: using (SPSite sps = new SPSite("http://server/")) { using (SPWeb spw = sps.OpenWeb()) { SPList spSharedDocs = spw.Lists["Shared Documents"]; ...

posted @ Wednesday, September 10, 2008 12:00 AM | Feedback (0)

How to Create a Login/Registration System Using FBA with Active Directory in a SharePoint Server 2007

To use the forms based authentication(FBA) against an Active Directory(AD) for a SharePoint Server 2007, you will need to use the ActiveDirectoryMembershipProvider in ASP.NET 2.0. I outlined key steps to enable FBA against an AD for a SharePoint Server 2007. Step 1 - Edit the AD Schema To suppport Password Reset (Password Recovery), you will need to edit the AD schema by running the following command: regsvr32.exe schmmgmt.dll. The detailed step to edit the AD is defined in Password Reset section of this article. Step 2 - Set up Intranet and Extranet Zone Once the AD schema has been edited, you will need...

posted @ Tuesday, September 09, 2008 12:00 AM | Feedback (0)

Using PostBack on SPGridView and SPMenuField

I found several questions on the Internet about being unable to use MenuItemTemplate.ClientOnClickUsingPostBackEvent on a custom web part with SPGridView including this blog [1] and this post [2]. Being intrigued, I tried several approaches, and I could not make the ClientOnClickUsingPostBackEvent either. Instead, I found a workaround which should behave just like the ClientOnClickUsingPostBackEvent.   The solution is to use __doPostBack plus this.UniqueID inside a custom web part uses IPostBackEventHandler. Here is a code snippet:   displayInvoices = new MenuItemTemplate("Display Invoices", "/_layouts/images/invoice.gif"); displayInvoices.ClientOnClickScript = "__doPostBack('" + this.UniqueID + "','%EDIT%')"; Please ping me if you need a full source code. Then I'll update this article and upload...

posted @ Sunday, April 06, 2008 7:56 PM | Feedback (2)

Must-have tools for SharePoint development

Carpenters need good tools to build a house efficiently. The same is true for SharePoint. Without nice tools, SharePoint development can be frustrating and time consuming. I collected a list of tools which are useful for daily SharePoint tasks. • Virtual Machine - The ideal development environment is a virtual machine, not a physical server or desktop. It's much easier and efficient to host a SharePoint server and all the following tools in a virtual machine. The most widely used virtual machine softwares for developers are VMWare Workstation and Microsoft Virtual PC 2007. VMWare Workstation is not free,...

posted @ Saturday, March 29, 2008 7:15 PM | Feedback (0)

Displaying Subwebs

A DataView webpart is a nice component to display SharePoint data. It can connect to various data sources including SharePoint web services which are located under http://[server]/_vti_bin. Here I'd like to show how you can display sub sites on a DataView webpart using SharePoint webs.asmx web service. With this approach, you can easily expose sub sites without any coding...

posted @ Thursday, March 27, 2008 11:20 PM | Feedback (4)