0
votes

I want to programmatically upoad a document to a Sharepoint library. After uploading I want to redirect the user to the Edit Page (OOB or custom) associated with the new library item.

How do I know where to redirect to?

1

1 Answers

1
votes

There's some examples here:

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/2be88c8b-812b-4574-8c2c-965cedd2f199/

// Edit form full url
string.Format("{0}{1}?ID={2}", item.Web.Url, item.ParentList.Forms[PAGETYPE.PAGE_EDITFORM].ServerRelativeUrl, item.ID);

// Edit form relative url
string.Format("{0}?ID={1}", item.ParentList.Forms[PAGETYPE.PAGE_EDITFORM].ServerRelativeUrl, item.ID);