I have an SDK for a network video recorder in which the SDK is in ASP.net that is in Javascript. Part of which is the following:

<code>
function getHTTPReq(){
//Create Http Request Object
var req;
if( window.XMLHttpRequest) req = new XMLHttpRequest();
else if(window.ActiveXObject)
{
var msxmls = [ "MSXML2.XMLHttp.4.0", "MSXML2.XMLHttp.3.0", "MSXML2.XMLHttp", "Microsoft.XMLHttp"];
for(i=0; i<=msxmls.length-1; i++)
{
try
{
req = new ActiveXObject(msxmls[i]);
break;
} catch(e) { }
}
}
return req;
}

function GetPlaybackId() {

getPbGidHttpReq=getHTTPReq();
if (typeof(getPbGidHttpReq)=="undefined") return;

getPbGidHttpReq.onreadystatechange=GetPlaybackId_OK;


//strCMD is the camera xmlcgi command


getPbGidHttpReq.open("GET",strCMD, true);
getPbGidHttpReq.send(null);
}


function GetPlaybackId_OK() {
if (getPbGidHttpReq.readyState == 4)
{
if(getPbGidHttpReq.responseText.indexOf('RET="0"')!=-1)
{
var xmlResponse = fnStringtoXML(getPbGidHttpReq.responseText);
PbGroupId = xmlResponse.getElementsByTagName("GroupID")[0].text;
}
}

</code>


The application that I am trying to develop is in VB.net. I use the following code:

<code>

Public Function GetHTMLSource(ByVal sURL As String) As String Dim xmlHttp As Object
xmlHttp = CreateObject("MSXML2.XmlHttp")
xmlHttp.Open("GET", sURL, False)
xmlHttp.Send()
GetHTMLSource = xmlHttp.responseText
xmlHttp = Nothing
End Function
</code>

And then use:

Call getHTMLSource (strCMD)

What I want though is to track the status of my request. Like when the browser has already responded or if the browser is taking a long time to respond.

If what I am saying is a bit hard to understand (because I am not certain that I am saying these things in the right way) then to put it simply, what I need is to somehow know how to implement the code above in VB.net. It is important for me to know how to monitor and determine the STATUS of the xmlhttprequest that I am making.

Thank you that you would try to help.

I thank you, in advance.

Regards,
Joycenel