 |
|
 |
I implemented this code in a project and it works great under IE6/7. However, it fails under FireFox 3. Do you have any suggestions for getting this thing to work in FireFox?
|
|
|
|
 |
|
 |
I followed the instructions and when running the site, I receive errors below:
Error 1 The type or namespace name 'TimerControl' could not be found (are you missing a using directive or an assembly reference?)
Error 2 The type or namespace name 'ScriptTextWriter' could not be found (are you missing a using directive or an assembly reference?)
Where did I go wrong? Please help. Thanks.
blumonde
|
|
|
|
 |
|
 |
The code was based on an earlier version of asp.net ajax (atlas)...
I'm now trying to figure out if they added this behaviour in asp.net ajax 1.0 RTM so that I can remove this code from my product or apply changes so that it works with the new version.
|
|
|
|
 |
|
 |
I still cannot make it work with VS 2008. Can you posted and update code with reference to new AJAX?
Thanks
|
|
|
|
 |
|
 |
great work!!! You save a lot of my time.
but, i am trying to change the interval property in de code-behind, but does not work. Any idea ?
Rodrigo
|
|
|
|
 |
|
 |
I followed the steps, downloaded timestopper.cs and did put it in App_code.
When i try to update web.config, it gives me an error about unknown element (pages) which was not closed in the article but i closed the tag with no success.
I only need a timer which refresh every some interval.
|
|
|
|
 |
|
 |
I spent 4 hours last night and I tried every possible thing you can imagin. This is going to save my project man!!! Thanks.
Arin
|
|
|
|
 |
|
 |
It works perfect and I had problems with that.
THANK YOU VERY MUCH
|
|
|
|
 |
|
 |
Actually, I was searching of how to solve this issue and have found this nice solution.
Thx.
|
|
|
|
 |
|
 |
Thanks for fixing the interval thing. I had tried everything I could think of.
Bruce
|
|
|
|
 |
|
 |
First, thank you very much for this code!! It has made my life so much easier now.
I do have one question regarding the interval. I wanted to allow my users to modify the refresh interval of the page. However, when they specify a new interval, it does not seem to affect the TimerControl. I have also atempted stopping and starting the timer before and after the interval change but it still doesn't work.
Am I doing something wrong or is this yet another known bug in the TimerControl?
Thanks,
Mike
|
|
|
|
 |
|
 |
Replace the OnPreRender in StoppableTimer.cs with the following and it will enable the changing of the interval:
protected override void OnPreRender(EventArgs e)
{
if (IsPageInPartialRendering)
{
string scriptSnippetFormat = "$object(\"{0}\").set_enabled({1});$object(\"{0}\").set_interval({2});";
string scriptSnippet = String.Format(scriptSnippetFormat, this.UniqueID, this.Enabled.ToString().ToLower(), this.Interval);
Page.ClientScript.RegisterStartupScript(
GetType(),
this.UniqueID,
scriptSnippet,
true);
}
base.OnPreRender(e);
}
--
john
|
|
|
|
 |
|
 |
Perfect! Thanks a lot!
Mike
|
|
|
|
 |
|
 |
where can i change the interval of the timer now??? in client or on server code??
can you please show me a little example
thx alot
|
|
|
|
 |
|
 |
I tried on my site. It works in a simple page like yours, but on a complete page (using master page), timer doesn't stop. Also, what is the purpose of the empty <script type="text/xml-script"> on page? Thanks Manu
|
|
|
|
 |
|
 |
This issue has been fixed in the next version of ASP.NET ATlas due to be released this week.
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan
|
|
|
|
 |
|
 |
i have a usercontrol that has atlas timer inside it.When i place the usercontrol on the webform
it giving an error that "You must have a script manager on the page to use Timer control". I have the script manager on the page, Still it does'nt work. All the code compiles alright and even the code inside the timer gets excuted but the changes are not displayed. Any help on this greatly appreciated.
Thanks,
Srinivas
|
|
|
|
 |
|
 |
Try putting a ScriptManager tag on the aspx page that includes the control, and a ScriptManagerProxy control inside your ascx, before any other atlas tags.
|
|
|
|
 |
|
 |
Thanks for the response, i found a work around for my application.thanks alot for the response
|
|
|
|
 |
|
 |
This solves a major problem that people from all over are looking for a solution to: the lack of OnForward and OnBack events, in ASP.net and javascript, also known as the broken back button behavior by some. I have an atlas/ajax web app consisting of 3 pages, with many possible states of each page. These states however, are done with asynchronous callbacks, so when a user is on page 3, and push back they jump immediately to the initial state of page 2. After the first async callback, they jump to the state they were at last, pleus whatever the new action does, since the client and server are out of sync.
I used your stopable timerControl inside my update panel with a 1 ms delay, so that every time a user lands on my page, even with the back button, the server is contacted and I can synchronize the client view with the server data
Thank you so much for this code. Finding it immediately ended two days of frustrating endeavours with javascript.
Greg "I hate computers" Davies BCSc.
|
|
|
|
 |
|
 |
I am using the JULY CTP but the bug is not yet corrected!
Thanks for saving my presentation!
"We don't see things how they are. We see things as we are." -Talmud
|
|
|
|
 |
|
 |
You saved my day! It works great for me!
|
|
|
|
 |
|
 |
I've fallow the steps you mentioned but the Timer still raises the event Tick after Server.Transfer("...").
If I set Enabled = false at design time, the event Tick doesn´t fires.
I don't know what else to try.
|
|
|
|
 |
|
 |
Can you post some sample code? or email it to me?
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan
|
|
|
|
 |
|
 |
I'm very sorry. The problem wasn`t the timer, it was an Update Panel calling Server.Transfer().
Thank you for your reply.
I'll try not to rush into conclusions next time.
|
|
|
|
 |