I am developing an ASP.NET web application that communicates to another application asynchronously.
In webform1 I call MyClass.Connect. At some point in the future I get a response from the object.
When I get my response I want to display a page telling the user about the response but I can’t just do System.Web.HttpContext.Current.Response.Redirect because the HttpContext is nothing.
Here is a snippet of the class
Public Class MyClass
Private Shared WithEvents _remClient As New RemoteClient
Public Sub Connect
_remClient.ConnectToServer
End Sub
Private Shared Sub _remClient_ClientConnected() Handles _remClient.ClientConnected
'I want to do a redirect here - how?
End Sub
End Class
Can someone give me an idea of how I can accomplish this?
This redirect must be done on browser using javascript.
Send as return a flag for redirect, and the url, where to go and then set: