473,224 Members | 1,627 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

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
Oct 8 '08 #1
6 4734
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...WebServicesWit
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...merControl.asp
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/..._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:
ms****@microsoft.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" <cz****@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
Oct 10 '08 #2

""Steven Cheng"" <st*****@online.microsoft.comwrote in message
news:EG**************@TK2MSFTNGHUB02.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:
ms****@microsoft.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: st*****@online.microsoft.com ("Steven Cheng")
Organization: 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:
ms****@microsoft.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
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!!!
Oct 14 '08 #3
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:
ms****@microsoft.com.
--------------------
>From: "Peter" <cz****@nospam.nospam>
References: <e8**************@TK2MSFTNGP05.phx.gbl>
<c7**************@TK2MSFTNGHUB02.phx.gbl>
<EG**************@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Auto Refresh Example
Date: Tue, 14 Oct 2008 09:21:54 -0500
>

""Steven Cheng"" <st*****@online.microsoft.comwrote in message
news:EG**************@TK2MSFTNGHUB02.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:
ms****@microsoft.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.
----
Oct 15 '08 #4
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:
ms****@microsoft.com.

--------------------
>Content-Type: text/plain
Content-Transfer-Encoding: 7bit
From: st*****@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:
ms****@microsoft.com.
--------------------
>>From: "Peter" <cz****@nospam.nospam>
References: <e8**************@TK2MSFTNGP05.phx.gbl>
<c7**************@TK2MSFTNGHUB02.phx.gbl>
<EG**************@TK2MSFTNGHUB02.phx.gbl>
>>Subject: Re: Auto Refresh Example
Date: Tue, 14 Oct 2008 09:21:54 -0500
>>

""Steven Cheng"" <st*****@online.microsoft.comwrote in message
news:EG**************@TK2MSFTNGHUB02.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:
ms****@microsoft.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.
----

Oct 20 '08 #5

""Steven Cheng"" <st*****@online.microsoft.comwrote in message
news:f4**************@TK2MSFTNGHUB02.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:
ms****@microsoft.com.

--------------------
>>Content-Type: text/plain
Content-Transfer-Encoding: 7bit
From: st*****@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:
ms****@microsoft.com.
--------------------
>>>From: "Peter" <cz****@nospam.nospam>
References: <e8**************@TK2MSFTNGP05.phx.gbl>
<c7**************@TK2MSFTNGHUB02.phx.gbl>
<EG**************@TK2MSFTNGHUB02.phx.gbl>
>>>Subject: Re: Auto Refresh Example
Date: Tue, 14 Oct 2008 09:21:54 -0500
>>>

""Steven Cheng"" <st*****@online.microsoft.comwrote in message
news:EG**************@TK2MSFTNGHUB02.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:
ms****@microsoft.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!
Oct 21 '08 #6
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:
ms****@microsoft.com.

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

--------------------
>From: "Peter" <cz****@nospam.nospam>
Subject: Re: Auto Refresh Example
Date: Tue, 21 Oct 2008 16:55:06 -0500
>
""Steven Cheng"" <st*****@online.microsoft.comwrote in message
news:f4**************@TK2MSFTNGHUB02.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:
ms****@microsoft.com.

--------------------
>>>Content-Type: text/plain
Content-Transfer-Encoding: 7bit
From: st*****@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:
ms****@microsoft.com.
--------------------
From: "Peter" <cz****@nospam.nospam>
References: <e8**************@TK2MSFTNGP05.phx.gbl>
<c7**************@TK2MSFTNGHUB02.phx.gbl>
<EG**************@TK2MSFTNGHUB02.phx.gbl>
Subject: Re: Auto Refresh Example
Date: Tue, 14 Oct 2008 09:21:54 -0500

""Steven Cheng"" <st*****@online.microsoft.comwrote in message
news:EG**************@TK2MSFTNGHUB02.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:
ms****@microsoft.com.
>
============================================== ====
Get notification to my posts through email? Please refer to
>
http://msdn.microsoft.com/en-us/subs...#notifications
Oct 22 '08 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Lew | last post by:
Hi all, I'm trying to create a page that has a user-selectable page auto-refresh option (IE 5.5). Essentially, it's a page that contains a checkbox, when the user checks the checkbox, I'd like...
0
by: Marcus | last post by:
Hello! I'm buildning a webpage in ASP.NET using Visual Basic. The page contains a datagrid, a dropdownlist, some textboxes and a couple of buttons. The datagrid displays barcodes from a table...
3
by: blu3g85 | last post by:
how to redirect a page? as in after a few sec, the page will auto direct u to another page. ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----...
7
by: Brian | last post by:
hello, I am looking for a way to auto refresh a web page that I created, but also let the user choose to stop the auto refresh. I can not figure out how to stop the auto refresh. Any help would...
3
by: david | last post by:
I do not have the experience with it. For example, update the data in the ASP form every minute by retrieving data from database. Or do you have other methods? Thank you for any advice and...
1
by: Badass Scotsman | last post by:
Hello, I have an application which should never allow the back button to be pushed without refreshing the previous page. For example: Step 1: User fills in form.html and presses submit ...
3
by: lezzo | last post by:
Hi Guys, I am new to this forum and find very interesting. I need your help in one of the script. I got a MySQL table bid_amount, and i want that if some new data comes in this table and...
1
by: BibhuAshish | last post by:
hi, I have designed a jsp page. This jsp is able to auto refresh after 5 second. But i want after 5th times of auto refreshment the table present inside the body should change. Can anybody...
2
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post by:
Hi I have a web page that has a TreeView on it. If I DONT'T expand the TreeView nodes, the auto refresh works nicely: my page gets refreshed every minute. As soon as I expand a node on the...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.