Conversion problem Updating part of an ASP.NET page
-
I am having problems with dynamically updating part of a ASP.NET page without reloading the whole page. I am using JavaScript to call a Web Service Method every 5 seconds. The method returns a 16 byte array declared as byte[] within the Web Service. I want to convert the 16 bytes into 4 seperate variables represented as "int, float, float and float". Once converted, I can update HTML text boxes with the 4 variables. Does anyone know how to do this? Here is my code "just in case you wanted to see": <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="LearningDisplay.WebForm1" %> function InitTimer() { GetVAXData(); setInterval("GetVAXData()",1000); } function GetVAXData() { Service.useService("LearningService.asmx?WSDL","LearningService"); iReturnID = Service.LearningService.callService("GetLearningData"); } function ReturnedData() { //This is where I am having problems //I want to use something like txtInt.innerText = event.result.value; txtInt.innerText = event.result.value; } WebForm1
-
I am having problems with dynamically updating part of a ASP.NET page without reloading the whole page. I am using JavaScript to call a Web Service Method every 5 seconds. The method returns a 16 byte array declared as byte[] within the Web Service. I want to convert the 16 bytes into 4 seperate variables represented as "int, float, float and float". Once converted, I can update HTML text boxes with the 4 variables. Does anyone know how to do this? Here is my code "just in case you wanted to see": <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="LearningDisplay.WebForm1" %> function InitTimer() { GetVAXData(); setInterval("GetVAXData()",1000); } function GetVAXData() { Service.useService("LearningService.asmx?WSDL","LearningService"); iReturnID = Service.LearningService.callService("GetLearningData"); } function ReturnedData() { //This is where I am having problems //I want to use something like txtInt.innerText = event.result.value; txtInt.innerText = event.result.value; } WebForm1
-
Leave ASP.NET out of this :). I would create an IFRAME inside an ASPX page pointing to a normal HTML page and let javascript do all the work. Hope this helps :) DBHelper - SQL Stored Procedure Wrapper & Typed DataSet Generator for .NET
OK, I will leave ASP.NET out ;). I was using Visual Studio.NET to build the aspx page. I was trying to find a way to update portions of the aspx page from the server-side without success. I would really like to know if this can be done and how!!! Since I couldn't find anything that would work on the server-side, I decided to try writing some JavaScript Code that would update a HTML control every second from a WebService. I was able to get this to work by passing a simple integer. Now I want to expand by passing an array of bytes or some type of array "I don't know if Web service behavior can accept a byte array". :~ As far as the IFRAME, I am not too sure what it will do for me in the sense of converting the 16 bytes to "int, float, float and float". :~ Where can I find such an example? Thanks for the reply, Tom
-
OK, I will leave ASP.NET out ;). I was using Visual Studio.NET to build the aspx page. I was trying to find a way to update portions of the aspx page from the server-side without success. I would really like to know if this can be done and how!!! Since I couldn't find anything that would work on the server-side, I decided to try writing some JavaScript Code that would update a HTML control every second from a WebService. I was able to get this to work by passing a simple integer. Now I want to expand by passing an array of bytes or some type of array "I don't know if Web service behavior can accept a byte array". :~ As far as the IFRAME, I am not too sure what it will do for me in the sense of converting the 16 bytes to "int, float, float and float". :~ Where can I find such an example? Thanks for the reply, Tom
Tom McDaniel wrote: As far as the IFRAME, I am not too sure what it will do for me in the sense of converting the 16 bytes to "int, float, float and float". I meant to say that you use the IFRAME on top of the webpage (ASPX or not). And only update that. That way you can push info only to the IFRAME's source page and the whole page doesnot have to reload. Only the IFRAME's source. BUT doing that every second might be a bit much. How about some JAVA? :) Might be the easiest way out :) DBHelper - SQL Stored Procedure Wrapper & Typed DataSet Generator for .NET
-
Tom McDaniel wrote: As far as the IFRAME, I am not too sure what it will do for me in the sense of converting the 16 bytes to "int, float, float and float". I meant to say that you use the IFRAME on top of the webpage (ASPX or not). And only update that. That way you can push info only to the IFRAME's source page and the whole page doesnot have to reload. Only the IFRAME's source. BUT doing that every second might be a bit much. How about some JAVA? :) Might be the easiest way out :) DBHelper - SQL Stored Procedure Wrapper & Typed DataSet Generator for .NET
;)Leppie, thanks for your help. You seem to know your stuff pretty well. I think I know what is needed to accomplish my task. I am currently trying to access the web service but, I keep getting "Access Denied". I am pulling my hair out trying to figure this one out. Once I fix this problem, I believe that I can refresh portions of my web page at least 1 every 5 seconds.:) Thanks, Tom