Auto Refresh Example

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter

    Auto Refresh Example

    I have a APS.NET 3.5 webpage which calls a web service.
    What I need is to update this page automatically when a value changes in the
    webservice, does anyone have an example?


    Thank You


    Peter


  • Steven Cheng

    #2
    RE: Auto Refresh Example

    Hi Peter,

    From your description, I understand that you want to call some webservice
    in ASP.NET web page, and also want to let the page be updated automatically
    when a certain value on server-side get changed(by webservice), correct?

    As for the webservice and page, I'd like to confirm the following things:

    1. is the webservice method(called in page) a long run webmethod which will
    take long time? And is it a local webservice with the ASP.NET pages(in same
    project) or a remote one?

    2. How do you call it currently? If local, you can call it via ajax, or if
    it is a remote one, you have to postback to server-side to call the
    webservice.

    As far as I know, since webservice itself doesn't support built-in callback
    interface to notify client. The common approach to get notify (when a state
    at server-side changed) is using timer+polling. In ASP.NET 3.5
    application, this can be done via AJAX client-side script. Here is the work
    you need to do in the page:

    ** add a local webservice in ASP.NET project (or a static page method ) so
    that you can use AJAX to call it

    #Calling Web Services from Client Script in ASP.NET AJAX
    Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.

    hAJAXTutorial.a spx

    ** in page, after you have called that long-run webservice, you can use
    javascript to constantly call the above webmethod to query the state at
    server-side.

    Or you can directly use the AJAX timer control to do this either:

    Build web apps and services that run on Windows, Linux, and macOS using C#, HTML, CSS, and JavaScript. Get started for free on Windows, Linux, or macOS.

    x

    Here are some other web articles introduced some means for implement such
    long-run task + status query:

    #Real-Time Progress Bar With ASP.NET AJAX

    spx

    #Display data updates in real-time with AJAX


    If you have anything unclear on the specific part, please feel free to let
    me know.

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:
    msdnmg@microsof t.com.

    =============== =============== =============== =====
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/en-us/subs...#notifications.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://support.microsoft.com/select/...tance&ln=en-us.
    =============== =============== =============== =====
    This posting is provided "AS IS" with no warranties, and confers no rights.

    --------------------
    >From: "Peter" <czupet@nospam. nospam>
    >Subject: Auto Refresh Example
    >Date: Wed, 8 Oct 2008 16:24:58 -0500
    >
    >I have a APS.NET 3.5 webpage which calls a web service.
    >What I need is to update this page automatically when a value changes in
    the
    >webservice, does anyone have an example?
    >
    >
    >Thank You
    >
    >
    >Peter
    >
    >
    >

    Comment

    • Peter

      #3
      Re: Auto Refresh Example


      ""Steven Cheng"" <stcheng@online .microsoft.comw rote in message
      news:EG02JMeLJH A.1804@TK2MSFTN GHUB02.phx.gbl. ..
      Hi Peter,
      >
      How are you doing?
      >
      have you got any progress on this or does the information in my last reply
      help some?
      >
      If there is anything else need help, please don't hesitate to post here.
      >
      Sincerely,
      >
      Steven Cheng
      >
      Microsoft MSDN Online Support Lead
      >
      >
      Delighting our customers is our #1 priority. We welcome your comments and
      suggestions about how we can improve the support we provide to you. Please
      feel free to let my manager know what you think of the level of service
      provided. You can send feedback directly to my manager at:
      msdnmg@microsof t.com.
      >
      =============== =============== =============== =====
      Get notification to my posts through email? Please refer to
      http://msdn.microsoft.com/en-us/subs...#notifications.
      =============== =============== =============== =====
      This posting is provided "AS IS" with no warranties, and confers no
      rights.
      >
      >
      --------------------
      >>From: stcheng@online. microsoft.com ("Steven Cheng")
      >>Organizatio n: Microsoft
      >>Date: Fri, 10 Oct 2008 02:49:25 GMT
      >>Subject: RE: Auto Refresh Example
      >
      >>
      >>Hi Peter,
      >>
      >>From your description, I understand that you want to call some webservice
      >>in ASP.NET web page, and also want to let the page be updated
      automatically
      >>when a certain value on server-side get changed(by webservice), correct?
      >>
      >>As for the webservice and page, I'd like to confirm the following things:
      >>
      >>1. is the webservice method(called in page) a long run webmethod which
      will
      >>take long time? And is it a local webservice with the ASP.NET pages(in
      same
      >>project) or a remote one?
      >>
      >>2. How do you call it currently? If local, you can call it via ajax, or if
      >>it is a remote one, you have to postback to server-side to call the
      >>webservice.
      >>
      >>As far as I know, since webservice itself doesn't support built-in
      callback
      >>interface to notify client. The common approach to get notify (when a
      state
      >>at server-side changed) is using timer+polling. In ASP.NET 3.5
      >>application , this can be done via AJAX client-side script. Here is the
      work
      >>you need to do in the page:
      >>
      >>** add a local webservice in ASP.NET project (or a static page method ) so
      >>that you can use AJAX to call it
      >>
      >>#Calling Web Services from Client Script in ASP.NET AJAX
      >>http://www.asp.net/AJAX/Documentatio...gWebServicesWi
      t
      >>hAJAXTutorial .aspx
      >>
      >>** in page, after you have called that long-run webservice, you can use
      >>javascript to constantly call the above webmethod to query the state at
      >>server-side.
      >>
      >>Or you can directly use the AJAX timer control to do this either:
      >>
      >>http://www.asp.net/ajax/documentatio...imerControl.as
      p
      >>x
      >>
      >>Here are some other web articles introduced some means for implement such
      >>long-run task + status query:
      >>
      >>#Real-Time Progress Bar With ASP.NET AJAX
      >>http://www.singingeels.com/Articles/...th_ASPNET_AJAX.
      a
      >>spx
      >>
      >>#Display data updates in real-time with AJAX
      >>http://encosia.com/2007/07/25/displa...ime-with-ajax/
      >>
      >>If you have anything unclear on the specific part, please feel free to let
      >>me know.
      >>
      >>Sincerely,
      >>
      >>Steven Cheng
      >>
      >>Microsoft MSDN Online Support Lead
      >>
      >>
      >>Delighting our customers is our #1 priority. We welcome your comments and
      >>suggestions about how we can improve the support we provide to you. Please
      >>feel free to let my manager know what you think of the level of service
      >>provided. You can send feedback directly to my manager at:
      >>msdnmg@micros oft.com.
      >>
      >>============= =============== =============== =======
      >>Get notification to my posts through email? Please refer to
      >>http://msdn.microsoft.com/en-us/subs...#notifications.
      >>
      >>Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
      >>where an initial response from the community or a Microsoft Support
      >>Engineer within 1 business day is acceptable. Please note that each follow
      >>up response may take approximately 2 business days as the support
      >>professiona l working with you may need further investigation to reach the
      >>most efficient resolution. The offering is not appropriate for situations
      >>that require urgent, real-time or phone-based interactions or complex
      >>project analysis and dump analysis issues. Issues of this nature are best
      >>handled working with a dedicated Microsoft Support Engineer by contacting
      >>Microsoft Customer Support Services (CSS) at
      >>http://support.microsoft.com/select/...tance&ln=en-us
      I have not had a chance to look at any of the examples, but I will look at
      them in next couple of days.

      Thank you!!!


      Comment

      • Steven Cheng

        #4
        Re: Auto Refresh Example

        Thanks for your reply Peter.

        No problem. If you come back on this later and have any questions, please
        feel free to post here.

        Sincerely,

        Steven Cheng

        Microsoft MSDN Online Support Lead


        Delighting our customers is our #1 priority. We welcome your comments and
        suggestions about how we can improve the support we provide to you. Please
        feel free to let my manager know what you think of the level of service
        provided. You can send feedback directly to my manager at:
        msdnmg@microsof t.com.


        --------------------
        >From: "Peter" <czupet@nospam. nospam>
        >References: <e8h1RxYKJHA.52 32@TK2MSFTNGP05 .phx.gbl>
        <c7ZGZLoKJHA.16 56@TK2MSFTNGHUB 02.phx.gbl>
        <EG02JMeLJHA.18 04@TK2MSFTNGHUB 02.phx.gbl>
        >Subject: Re: Auto Refresh Example
        >Date: Tue, 14 Oct 2008 09:21:54 -0500
        >
        >
        >""Steven Cheng"" <stcheng@online .microsoft.comw rote in message
        >news:EG02JMeLJ HA.1804@TK2MSFT NGHUB02.phx.gbl ...
        >Hi Peter,
        >>
        >How are you doing?
        >>
        >have you got any progress on this or does the information in my last
        reply
        >help some?
        >>
        >If there is anything else need help, please don't hesitate to post here.
        >>
        >Sincerely,
        >>
        >Steven Cheng
        >>
        >Microsoft MSDN Online Support Lead
        >>
        >>
        >Delighting our customers is our #1 priority. We welcome your comments and
        >suggestions about how we can improve the support we provide to you.
        Please
        >feel free to let my manager know what you think of the level of service
        >provided. You can send feedback directly to my manager at:
        >msdnmg@microsof t.com.
        >>
        >============== =============== =============== ======
        >Get notification to my posts through email? Please refer to
        >>
        http://msdn.microsoft.com/en-us/subs...#notifications.
        >============== =============== =============== ======
        >This posting is provided "AS IS" with no warranties, and confers no
        >rights.
        >>
        >>
        >----

        Comment

        • Steven Cheng

          #5
          Re: Auto Refresh Example

          Hi Peter,

          Any further progress on this issue or is there anything else need help?

          Sincerely,

          Steven Cheng

          Microsoft MSDN Online Support Lead


          Delighting our customers is our #1 priority. We welcome your comments and
          suggestions about how we can improve the support we provide to you. Please
          feel free to let my manager know what you think of the level of service
          provided. You can send feedback directly to my manager at:
          msdnmg@microsof t.com.

          --------------------
          >Content-Type: text/plain
          >Content-Transfer-Encoding: 7bit
          >From: stcheng@online. microsoft.com ("Steven Cheng")
          >Organization : Microsoft
          >Date: Wed, 15 Oct 2008 02:13:16 GMT
          >
          >Thanks for your reply Peter.
          >
          >No problem. If you come back on this later and have any questions, please
          >feel free to post here.
          >
          >Sincerely,
          >
          >Steven Cheng
          >
          >Microsoft MSDN Online Support Lead
          >
          >
          >Delighting our customers is our #1 priority. We welcome your comments and
          >suggestions about how we can improve the support we provide to you. Please
          >feel free to let my manager know what you think of the level of service
          >provided. You can send feedback directly to my manager at:
          >msdnmg@microso ft.com.
          >
          >
          >--------------------
          >>From: "Peter" <czupet@nospam. nospam>
          >>References: <e8h1RxYKJHA.52 32@TK2MSFTNGP05 .phx.gbl>
          ><c7ZGZLoKJHA.1 656@TK2MSFTNGHU B02.phx.gbl>
          ><EG02JMeLJHA.1 804@TK2MSFTNGHU B02.phx.gbl>
          >>Subject: Re: Auto Refresh Example
          >>Date: Tue, 14 Oct 2008 09:21:54 -0500
          >
          >>
          >>
          >>""Steven Cheng"" <stcheng@online .microsoft.comw rote in message
          >>news:EG02JMeL JHA.1804@TK2MSF TNGHUB02.phx.gb l...
          >>Hi Peter,
          >>>
          >>How are you doing?
          >>>
          >>have you got any progress on this or does the information in my last
          >reply
          >>help some?
          >>>
          >>If there is anything else need help, please don't hesitate to post here.
          >>>
          >>Sincerely,
          >>>
          >>Steven Cheng
          >>>
          >>Microsoft MSDN Online Support Lead
          >>>
          >>>
          >>Delighting our customers is our #1 priority. We welcome your comments
          and
          >>suggestions about how we can improve the support we provide to you.
          >Please
          >>feel free to let my manager know what you think of the level of service
          >>provided. You can send feedback directly to my manager at:
          >>msdnmg@microsof t.com.
          >>>
          >>============= =============== =============== =======
          >>Get notification to my posts through email? Please refer to
          >>>
          >http://msdn.microsoft.com/en-us/subs...#notifications.
          >>============= =============== =============== =======
          >>This posting is provided "AS IS" with no warranties, and confers no
          >>rights.
          >>>
          >>>
          >>----
          >
          >

          Comment

          • Peter

            #6
            Re: Auto Refresh Example


            ""Steven Cheng"" <stcheng@online .microsoft.comw rote in message
            news:f4ANuGqMJH A.1388@TK2MSFTN GHUB02.phx.gbl. ..
            Hi Peter,
            >
            Any further progress on this issue or is there anything else need help?
            >
            Sincerely,
            >
            Steven Cheng
            >
            Microsoft MSDN Online Support Lead
            >
            >
            Delighting our customers is our #1 priority. We welcome your comments and
            suggestions about how we can improve the support we provide to you. Please
            feel free to let my manager know what you think of the level of service
            provided. You can send feedback directly to my manager at:
            msdnmg@microsof t.com.
            >
            --------------------
            >>Content-Type: text/plain
            >>Content-Transfer-Encoding: 7bit
            >>From: stcheng@online. microsoft.com ("Steven Cheng")
            >>Organizatio n: Microsoft
            >>Date: Wed, 15 Oct 2008 02:13:16 GMT
            >
            >>
            >>Thanks for your reply Peter.
            >>
            >>No problem. If you come back on this later and have any questions, please
            >>feel free to post here.
            >>
            >>Sincerely,
            >>
            >>Steven Cheng
            >>
            >>Microsoft MSDN Online Support Lead
            >>
            >>
            >>Delighting our customers is our #1 priority. We welcome your comments and
            >>suggestions about how we can improve the support we provide to you. Please
            >>feel free to let my manager know what you think of the level of service
            >>provided. You can send feedback directly to my manager at:
            >>msdnmg@micros oft.com.
            >>
            >>
            >>--------------------
            >>>From: "Peter" <czupet@nospam. nospam>
            >>>References : <e8h1RxYKJHA.52 32@TK2MSFTNGP05 .phx.gbl>
            >><c7ZGZLoKJHA. 1656@TK2MSFTNGH UB02.phx.gbl>
            >><EG02JMeLJHA. 1804@TK2MSFTNGH UB02.phx.gbl>
            >>>Subject: Re: Auto Refresh Example
            >>>Date: Tue, 14 Oct 2008 09:21:54 -0500
            >>
            >>>
            >>>
            >>>""Steven Cheng"" <stcheng@online .microsoft.comw rote in message
            >>>news:EG02JMe LJHA.1804@TK2MS FTNGHUB02.phx.g bl...
            >>>Hi Peter,
            >>>>
            >>>How are you doing?
            >>>>
            >>>have you got any progress on this or does the information in my last
            >>reply
            >>>help some?
            >>>>
            >>>If there is anything else need help, please don't hesitate to post
            >>>here.
            >>>>
            >>>Sincerely,
            >>>>
            >>>Steven Cheng
            >>>>
            >>>Microsoft MSDN Online Support Lead
            >>>>
            >>>>
            >>>Delighting our customers is our #1 priority. We welcome your comments
            and
            >>>suggestion s about how we can improve the support we provide to you.
            >>Please
            >>>feel free to let my manager know what you think of the level of service
            >>>provided. You can send feedback directly to my manager at:
            >>>msdnmg@microsof t.com.
            >>>>
            >>>============ =============== =============== ========
            >>>Get notification to my posts through email? Please refer to
            >>>>
            >>http://msdn.microsoft.com/en-us/subs...#notifications.
            >>>============ =============== =============== ========
            >>>This posting is provided "AS IS" with no warranties, and confers no
            >>>rights.
            >>>>
            >>>>
            >>>----
            >>
            >>
            >
            Thank you,

            The timer suggestion wroks for me!


            Comment

            • Steven Cheng

              #7
              Re: Auto Refresh Example

              Thanks for your followup Peter,

              I'm glad that it works for you. If you need any further help later, welcome
              to post in the newsgroup.

              Sincerely,

              Steven Cheng
              Microsoft MSDN Online Support Lead

              Delighting our customers is our #1 priority. We welcome your comments and
              suggestions about how we can improve the support we provide to you. Please
              feel free to let my manager know what you think of the level of service
              provided. You can send feedback directly to my manager at:
              msdnmg@microsof t.com.

              =============== =============== =============== =====
              Get notification to my posts through email? Please refer to


              --------------------
              >From: "Peter" <czupet@nospam. nospam>
              >Subject: Re: Auto Refresh Example
              >Date: Tue, 21 Oct 2008 16:55:06 -0500
              >
              >""Steven Cheng"" <stcheng@online .microsoft.comw rote in message
              >news:f4ANuGqMJ HA.1388@TK2MSFT NGHUB02.phx.gbl ...
              >Hi Peter,
              >>
              >Any further progress on this issue or is there anything else need help?
              >>
              >Sincerely,
              >>
              >Steven Cheng
              >>
              >Microsoft MSDN Online Support Lead
              >>
              >>
              >Delighting our customers is our #1 priority. We welcome your comments and
              >suggestions about how we can improve the support we provide to you.
              Please
              >feel free to let my manager know what you think of the level of service
              >provided. You can send feedback directly to my manager at:
              >msdnmg@microsof t.com.
              >>
              >--------------------
              >>>Content-Type: text/plain
              >>>Content-Transfer-Encoding: 7bit
              >>>From: stcheng@online. microsoft.com ("Steven Cheng")
              >>>Organization : Microsoft
              >>>Date: Wed, 15 Oct 2008 02:13:16 GMT
              >>
              >>>
              >>>Thanks for your reply Peter.
              >>>
              >>>No problem. If you come back on this later and have any questions, please
              >>>feel free to post here.
              >>>
              >>>Sincerely,
              >>>
              >>>Steven Cheng
              >>>
              >>>Microsoft MSDN Online Support Lead
              >>>
              >>>
              >>>Delighting our customers is our #1 priority. We welcome your comments and
              >>>suggestion s about how we can improve the support we provide to you.
              Please
              >>>feel free to let my manager know what you think of the level of service
              >>>provided. You can send feedback directly to my manager at:
              >>>msdnmg@micro soft.com.
              >>>
              >>>
              >>>--------------------
              >>>>From: "Peter" <czupet@nospam. nospam>
              >>>>Reference s: <e8h1RxYKJHA.52 32@TK2MSFTNGP05 .phx.gbl>
              >>><c7ZGZLoKJHA .1656@TK2MSFTNG HUB02.phx.gbl>
              >>><EG02JMeLJHA .1804@TK2MSFTNG HUB02.phx.gbl>
              >>>>Subject: Re: Auto Refresh Example
              >>>>Date: Tue, 14 Oct 2008 09:21:54 -0500
              >>>
              >>>>
              >>>>
              >>>>""Steven Cheng"" <stcheng@online .microsoft.comw rote in message
              >>>>news:EG02JM eLJHA.1804@TK2M SFTNGHUB02.phx. gbl...
              >>>>Hi Peter,
              >>>>>
              >>>>How are you doing?
              >>>>>
              >>>>have you got any progress on this or does the information in my last
              >>>reply
              >>>>help some?
              >>>>>
              >>>>If there is anything else need help, please don't hesitate to post
              >>>>here.
              >>>>>
              >>>>Sincerely ,
              >>>>>
              >>>>Steven Cheng
              >>>>>
              >>>>Microsoft MSDN Online Support Lead
              >>>>>
              >>>>>
              >>>>Delightin g our customers is our #1 priority. We welcome your comments
              >and
              >>>>suggestio ns about how we can improve the support we provide to you.
              >>>Please
              >>>>feel free to let my manager know what you think of the level of
              service
              >>>>provided. You can send feedback directly to my manager at:
              >>>>msdnmg@microsof t.com.
              >>>>>
              >>>>=========== =============== =============== =========
              >>>>Get notification to my posts through email? Please refer to
              >>>>>
              >>>http://msdn.microsoft.com/en-us/subs...#notifications

              Comment

              Working...