Lawrence Avery
asked on
Asynchronous calls without AJAX
Can you make a Asynchronous call from a asp page without AJAX?
@ryan - actually, you CAN do it server side in classic asp
check out the WinHttpRequest object to send async requests:
check out the WinHttpRequest object to send async requests:
<%
Dim http: Set http = Server.CreateObject("WinHttp.WinHttpRequest.5.1")
Dim url: url = "https://www.siteName.com/....."
Dim data: data = "variableName=value&variableName2=value2&variableName3=value3........."
With http
Call .Open("POST", url, False)
Call .SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
Call .Send(data)
End With
If Left(http.Status, 1) = 2 Then
'Request succeeded with a HTTP 2xx response, do something...
Else
'Output error
Call Response.Write("Server returned: " & http.Status & " " & http.StatusText)
End If
%>
WinHttpRequest is basically AJAX (AJAX uses XMLHttpRequest) so not what OP wants in my opinion
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
you can do the Asynchronous call from server end. for example in ASP.NET
Using Asynchronous Methods in ASP.NET 4.5
https://docs.microsoft.com/en-us/aspnet/web-forms/overview/performance-and-caching/using-asynchronous-methods-in-aspnet-45
but not really doing that in ASP....