sharepointsharepoint-2010document-libraryevent-receiver

How to: Redirect after document adding to a sharepoint document library


i need to redirect the current user to a custom url after successfully uploading a document.

  1. the user clicks "+ new document" in the document library

  2. the user selects a local document

  3. the document gets uploaded and in that moment after it is successfully uploaded and the item is created in the list, i want to redirect the user to a custom url

Normally after successfully uploading a document to a document library under SharePoint 2010, the user gets a modal dialog where he sees only the field "Name" with the filename.

I want to prevent this. How could i achieve this?

Update

Isn't it possible to redirect a User after Document uploading inside a Document Library to redirect from Upload Form to a custom page instead of Edit.aspx within ann EventReceiver?

I am really frustated! I am now trying for over 3 days to get it working.

Here is my sample solution:

http://www.bog1.de/downloads/errd01.zip

You must create a document library "doclib" to get it work.

But it does not work! I have used samples from several sites. I have added the logic inside the ItemAdded event. But nothing happens. I only want to redirect the user to another page after successfully adding a document to a library. Is this such a hard problem to get it work untder sp2010?


Solution

  • It seems, that it is not possible in SharePoint 2010 inside an EventReceiver to redirect to a SharePoint page withoug haveing a modal dialog as in CancelWithRedirectUrl.