Customize the SharePoint listform (newform, editform, listform) with custom controls and javascript

This is the Visual studio version for SharePoint 2013 that i created of this initial code plex project

“Out of the box, Microsoft SharePoint has a very rich set of features, but sometimes you need more, or something a little different, to meet the needs of your project. This article will discuss various methods of presenting the UI for SharePoint list forms, such as the New, Edit, and Display forms used when adding an item to a list, or viewing and editing items.”

This include modifications of Create form only.

To activate the feature :

1. Activate site collection feature named “Code Project List Forms Demo”

2. Create a list based on the list definition named : “CP Project Redering Template Def”

3. The create form will contain the text from the user control “UserControl1” that you can customize, and also from : CPRenderingTemplate (which is the template of the form with save button etc)


[SharePoint 2010 – Error fixing] Content By Query WebPart, display items links with wrong URL

You are programmatically creating a ContentQueryWebPart and when you test the solution, you try to click on an item link and you get a :
“404 NOT FOUND” page error

The error :

The Content By Query Webpart displays items url as :
http://jeff/sites/test/News/Lists/Posts/1_.000 or


Solution :

When you programmatically create the CQWP, you need to set the attribute UseCopyUtil to true.
wpCqwp.UseCopyUtil = true;
After, the item url should works and will look like :


Explanation :

By default, when you create a CQWP by the interface, SharePoint set the property UseCopyUtil to true.
Programmatically it’s set to false (i saw it by exporting the webpart, which gave me a .webpart file , and i compared it to a content query webpart created by interface).
Msdn explains, about that property that :
“Objects that are not streamed, such as announcements or calendar events, do not have an associated URL. When you set this property to true, objects that are not streamed have an associated URL that points to the View property of the item. “ Msdn
Voila !

Blog at

Up ↑