displaying progressbar with multiple outputs

Last post 07-12-2007 8:48 PM by KaziManzurRashid. 1 replies.

Sort Posts:

  • displaying progressbar with multiple outputs

    07-12-2007, 7:12 PM
    • Member
      428 point Member
    • msrnivas
    • Member since 05-14-2003, 2:31 AM
    • Posts 115

    Hi

    want to display progressbar with persantage like 10,20,...100%.
    calling webservice from my aspx page and webservice will call some third party component(like vc++) and returns the multiple outputs
    like 10,20,....100

     how do i get multiple outputs for single call to webservice?

    my task is based on output returned by the third party component i need to display the progressbar.

    how can i do this? please advice me.

     


    test.aspx

     

               <asp:ScriptManager ID="ScriptManager1" runat="server">
            <Services >
                <asp:ServiceReference Path="Service1.asmx" />
            </Services>
           
            </asp:ScriptManager>
           
       <input id="Imagebutton3" type="button"   onClick="test/>

     ]
    function test()
         {
       Service1.Send(str_output,Output);
         }


     function Output(result)
         {
     alert(result)// its always showing first retun value  say 10 only.
          }

     

    Webservice

    [WebMethod]
        public string Send(String strMessage)
        {
            string strReturn = "";
           
              
                    byte[] baMessage = EncodeMessage(strMessage);
                    System.Net.Sockets.TcpClient tcpClient = new System.Net.Sockets.TcpClient();
                    tcpClient.Connect("0.0.0.0", "190");
                    NetworkStream networkStream = tcpClient.GetStream();
                    networkStream.Write(baMessage, 0, baMessage.Length);
                    byte[] baReturn = new byte[tcpClient.ReceiveBufferSize];
                    networkStream.Read(baReturn, 0, tcpClient.ReceiveBufferSize);
                    networkStream.Close();
                    tcpClient.Close();
                    strReturn = DecodeMessage(baReturn);
                    return strReturn;
              
    }

  • Re: displaying progressbar with multiple outputs

    07-12-2007, 8:48 PM
    Answer
    • Contributor
      4,792 point Contributor
    • KaziManzurRashid
    • Member since 03-09-2003, 11:04 AM
    • Dhaka, Bangladesh
    • Posts 882

    Create a pair of WebService method the first one will start the process and update it status in session or in server memory, the second one will be used to get the current status. then in the client side first fire the first method. then use the window.setInterval to poll the status by calling the second method.

    Hope this will help.

    Long Live .NET
    Kazi Manzur Rashid (Amit)
    _________________________
    Web: http //dotnetshoutout.com
    Blog: http://weblogs.asp.net/rashid
    Twitter: http://twitter.com/manzurrashid
Page 1 of 1 (2 items)