Я пытаюсь перенаправить страницу после добавления элемента в метод itemAdded в пользовательском списке с помощью Sharepoint:
Public Class EventReceiver1
Inherits SPItemEventReceiver
Private current As HttpContext
Shared obj As Object
Public Sub New()
MyBase.New()
If current Is Nothing Then
current = HttpContext.Current
End If
End Sub
Public Overrides Sub ItemAdded(properties As SPItemEventProperties)
current = DirectCast(obj, HttpContext)
MyBase.ItemAdded(properties)
SPUtility.Redirect(properties.WebUrl & "/Paginas/Forms/EditForm.aspx?ID=" & properties.ListItemId, SPRedirectFlags.Trusted, current)
End Sub
Public Overrides Sub ItemAdding(properties As Microsoft.SharePoint.SPItemEventProperties)
obj = current
End Sub
End Class
Попытка использовать SPUtility.Redirect
, но не работает, работает только в методе ItemAdding.