Asp Website asynchronous calling of other IP device
-
I am developing a webserver application in ASP.Net 2 using C#. It places images of various remote controls on the browser screen in an imagebutton, and when the remote is clicked identifies the button clicked in a ImageButton1_Click(object sender, ImageClickEventArgs e) routine. That works fine, but where I am having trouble is that, depending on the button pressed, I need to pass command strings to an IR Trans device (simulating the remote) from my application without leaving the webpage. The IR Trans device has it's own webserver so what I am trying to do is asynchronously "shell" a text string to that device. Looking at documentation there are IAysnchronousHandlers that may be part of the solution. Can anyone suggest the best approach. Many Thanks
-
I am developing a webserver application in ASP.Net 2 using C#. It places images of various remote controls on the browser screen in an imagebutton, and when the remote is clicked identifies the button clicked in a ImageButton1_Click(object sender, ImageClickEventArgs e) routine. That works fine, but where I am having trouble is that, depending on the button pressed, I need to pass command strings to an IR Trans device (simulating the remote) from my application without leaving the webpage. The IR Trans device has it's own webserver so what I am trying to do is asynchronously "shell" a text string to that device. Looking at documentation there are IAysnchronousHandlers that may be part of the solution. Can anyone suggest the best approach. Many Thanks
Getting close I suspect the code is like
WebRequest req; WebResponse resp; Uri myuri= new Uri(@"http://192.168.10.10/"); req = HttpWebRequest.Create(myuri); resp = req.GetResponse();
Using the System.Net Namespace