I have a list in Visual Studio 2010 with a custom forms (EditForm/NewForm). I deploy the project to SharePoint Server 2010, to update the New Item form.

The problem is that if I deploy the project then the list is updated and all the items are deleted. But I only want to update the New Item form (an application page).

3 Answers 3


If you have a content type for your list, you can update DisplayFormUrl, NewFormUrl and EditFormUrl:

var list = GetList();
var contentTypeId = GetContentTypeId();
var contentType = list.ContentTypes[contentTypeId];
contentType.NewFormUrl = "http://<servername>/newFormUrl.aspx";

I suppose you can move your aspx page used as form to separate feature or even a separate project (and separate WSP packet) - then you will be able to update this form alone.


You can simply copy-paste your page (.aspx) to server template folder (typically located here C:\Program Files\Common Files\microsoft shared\Web Server Extensions\14; where 14 - it's SharePoint 2010, 15 - SharePoint 2013) and execute iisreset.

If you've updated your code behind class: compile it and execute a gacutil command:

gacutil /i YourLibrary.dll

Also, you need execute an iisreset.

Hope, it's helpful for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.