SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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).

share|improve this question

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";
share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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