Question

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?

Was it helpful?

Solution

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);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top