Fax ASP – Retrieve Fax Status (VB.NET fax code)

25 Nov 2016 This code sample is deprecated and in process of being removed. Check out our new code libraries and usage documentation on InterFAX @ Github.

This sample uses the FaxStatus method to retrieve the status of one or more faxes with ASP, using VB.NET fax code (aspx.vb).

The following fax ASP script uses VB.NET fax code to display information for a number of submitted faxes.

The script requires a proxy object (download it here, or learn how to create a new fax ASP proxy class here).



<%

Dim oSF As New interfax.InterFax() 'Reference to Interfax object
Dim List(9) As interfax.FaxItemEx 'Data structure (array) to hold results - max 10 items
Dim intTotalCount As Integer 'Total number of messages available for the user
Dim intListSize As Integer 'Actual size of list returned (Number of items in List()
Dim strOut as string 'Hold the results
Dim i As Integer
Dim intRet As Integer
'
' Invoke Interfax FaxStatus method
'
List = oSF.FaxStatusEx("", "", 999999999, 10, intTotalCount, intListSize, intRet)
If intRet  0 Then
'
' An error occured - see ducumentation
'
Response.Write("Error !! " & intRet)
Else
'
' A normal response returned from Interfax server
' Start display
'
Response.Write("Total received: " & intListSize & " of " & intTotalCount & "")
strOut = strOut & "TransactionID" & " : " & "Status" & " : " & "RemoteCSID" & vbCrLf

For i = 0 To intListSize - 1
Response.Write("TransactionID: " & List(i).TransactionID & " Status: " & List(i).Status & " Completed at: " & List(i).CompletionTime & "")
Next
'
' Clean up
'
oSF = Nothing
End If

%>