ASP.NET Fax – Get Information About Submitted Faxes (C# project)

This sample uses FaxQuery to retrieve information about one or more ASP.NET faxes, using the C# fax API (aspx.cs extension). The FaxQuery method has more flexible querying options than FaxStatus (for more details, see Side-by-side Comparison of Web Service Methods).

The following ASP.NET fax snippet, which can be found in the downloaded project files (FaxQuery.aspx.cs), uses C# to ask for the status of a specific fax (by transmission ID), and return the fax information:

string username = "my username";
string password = "my password";
interfax.InterFax ifws = new interfax.InterFax();
int st=-1;
interfax.FaxItemEx[] result = ifws.FaxQuery(username, password, "eq", "196805130", 1, ref st);
Response.Write("Status is " + st + "; Num of transactions: " + result.Length);