Search:
Namespaces
Discussions
.NET v1.1
Feedback
timer in a custom control?
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngcontrolscs' list
.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
dennismc@attbi.com
-- Moved from [aspngcontrolscs] to [aspngcontrolscs] by devin <
Click here to reveal e-mail address
> --
I am implementing a "news wire" custom control. It is
supposed to periodically poll a web service for new news
stories. How can I do this in an ASP.NET control?
If it were a Windows control, I would just include a
Timer. But I need the timer to run in the browser, and
trigger a postback to my control when the timer interval
expires. There is a window.SetInterval function in
JavaScript, but how can a control produce script that
will be executed when the page that contains the control
is loaded into the browser?
Thanks,
Dennis
Reply to this message...
Paul Brenner
[Original message clipped]
see System.Web.UI.
Page
.RegisterClientScriptBlock and
System.Web.UI.
Page
.RegisterStartupScript.
Thanks,
Dennis
| [aspngcontrolscs] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngcontrolscs.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
Reply to this message...
Scott Watermasysk (VIP)
Dennis,
You might want to just cache your news items. Once the cache expires, on the
next postback you can hit the web service, get your updates and re-cache the
data for your specified time frame.
I put together a sample control that retrieves data from the KBAlertz XML
newsfeed. The returned dataset is then cached for x (can be set by the user
of the control) numbers of minutes.
The control and full source code can be found at:
http://TripleASP.Net/KBAlertz.aspx?navid=34
HTH,
Scott
-----Original Message-----
From:
Click here to reveal e-mail address
[mailto:
Click here to reveal e-mail address
]
Sent: Thursday, June 20, 2002 9:55 AM
To: aspngcontrolscs
Subject: [aspngcontrolscs] timer in a custom control?
-- Moved from [aspngcontrolscs] to [aspngcontrolscs] by devin
<
Click here to reveal e-mail address
> --
I am implementing a "news wire" custom control. It is
supposed to periodically poll a web service for new news stories. How can I
do this in an ASP.NET control?
If it were a Windows control, I would just include a
Timer. But I need the timer to run in the browser, and
trigger a postback to my control when the timer interval expires. There is
a window.SetInterval function in
JavaScript, but how can a control produce script that
will be executed when the page that contains the control
is loaded into the browser?
Thanks,
Dennis
| [aspngcontrolscs] member
Click here to reveal e-mail address
=
| YOUR ID
http://www.asplists.com/asplists/aspngcontrolscs.asp
=
| JOIN/QUIT
http://www.asplists.com/search
= SEARCH Archives
Reply to this message...
System.Web.UI.Page
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com