CyberStore E-Payment 2023 Documentation
SafeRedirect Method


Dovetail.Ecommerce.ControlBases Namespace > CyberStoreBaseControl Class : SafeRedirect Method
URL of the redirect.
Safely redirects to a URL.
Syntax
'Declaration
 
Public Sub SafeRedirect( _
   ByVal redirectUrl As String _
) 
'Usage
 
Dim instance As CyberStoreBaseControl
Dim redirectUrl As String
 
instance.SafeRedirect(redirectUrl)
public void SafeRedirect( 
   string redirectUrl
)

Parameters

redirectUrl
URL of the redirect.
Remarks
SafeRedirect redirects but does so byclearing any server errors and allowing the request to complete cleanly. Use this method instead of Response.Redirect in CyberStore controls in order to avoid logging of "Thread Being Aborted Error" events in the CyberStore event log. Doing so eliminates the need for the redirect to be wrapped by Server.ClearError() and Context.ApplicationInstance.CompleteRequest() lines. EDIT: Now we dont log the Thread Aborted error, so we kill the thread like in the old days.
See Also

Reference

CyberStoreBaseControl Class
CyberStoreBaseControl Members