In my webpage I'm using Response.Redirect to redirect my users to another page. I'm using ASP vb.net, and I'm getting this error when I try to redirect:
First exception of type 'System.Web.HttpException' in System.Web.dll
Do you know what is wrong?
Thank you in advance.
Here my code:
<AjaxPro.AjaxMethod(HttpSessionStateRequirement.ReadWrite)>
Public Sub respuestaPeti(ByVal address As String, ByVal floor As String)
Dim res As String
res = pasarPeticion(address, floor)
Try
If res = "OK" Then
Response.Redirect("https://www.google.es/")
End If
If res = "NO_OK" Then
Response.Redirect("https://www.google.es/")
End If
If res = "OK_DIRMAL" Then
Response.Redirect("https://www.google.es/")
End If
Catch ex As Exception
End Try
End Sub