Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Conversion problem Updating part of an ASP.NET page

Conversion problem Updating part of an ASP.NET page

Scheduled Pinned Locked Moved ASP.NET
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tmagoo
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • T tmagoo

      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

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      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

      T 1 Reply Last reply
      0
      • L leppie

        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

        T Offline
        T Offline
        tmagoo
        wrote on last edited by
        #3

        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

        L 1 Reply Last reply
        0
        • T tmagoo

          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

          L Offline
          L Offline
          leppie
          wrote on last edited by
          #4

          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

          T 1 Reply Last reply
          0
          • L leppie

            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

            T Offline
            T Offline
            tmagoo
            wrote on last edited by
            #5

            ;)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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups