I have a webpage that performs calculations depending on the parameters and outputs the result through the OutputStream. It's in aspx and a simplified listing is as floows:-
Dim sVal As String = LCase(Request.QueryString("val")) Dim nVal As Integer = Convert.ToInt32(sVal) Din nResult = nVal + nVal Dim txW As TextWriter = New StreamWriter(Response.OutputStream) txW.Write(nResult.ToString())
I have a C# host program to invoke the webpage and read the result as follows:-
This all works fine. BUT I am trying to move off of the Windows platform and have found that if you write the webpage in Javascript the host read simply returns the webpage code. I've got round this by using a C# webbrowser component pointing to the webpage and having a timer in a loop read the page until the result appears.
I don't find this very elegant and am hoping that someone can find a platform independent solution in PHP, Python or whatever to allow me to read the result directly.