2

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

1

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";
0

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.

0

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.