[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

Misisng Timer in Visual Web Developer

Greetings (yet again!!)

I would like to make use of a timer in my application, but am I unable to find it oin my toolbox. Is the timer control available for web development? If so, where do i foind it? If not, what alternatives do I have?
0
allanmark
Asked:
allanmark
  • 6
  • 5
1 Solution
 
surajgupthaCommented:
If you are looking at your page reloading after n seconds read on >>

In my opinion it cannot be done using a server timer control. It has to be done using javascript
http://www.javascriptkit.com/script/script2/autofresh.shtml
0
 
Sammy AgeilCommented:
Only Ajax /Client script timers are supported in asp.net
the timer control you are looking for is used in windows applications ONLY and you can not write Windows Apps in VWD
for ajax timers, look at http://asp.net/ajax/ 

good luck
0
 
allanmarkAuthor Commented:
Thanks!

What exactly is Ajax? There appears to be so much about it.

As a peron who is startiugn off with ASP.NET, is it advisable to use Ajax? Or should I first learn the default ASP.NET before getting into such topics?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
surajgupthaCommented:
Well ajax is a way to stop postbacks so that the whole screen doesnt disappear. Its basically a framework to makes web applications richer.
Mu suggestion would be for you to start with classic ASP .net controls before starting off with ASP .net ajax
0
 
allanmarkAuthor Commented:
What you say makes good sense.

Atr the moment, the only Ajax control I need is the Timer. I have a table, with 6 columns and want to place the time in column 2. I tried placing a Label in column 2 and updating it's text property when the Tick event fired. Nothing happenend until I did a page refresh (probably not a good idea!!).

Do I use an UpdatePanel so that only a spoecific portion of the screen is refreshed? Can I link that to my label?









From what I can understand, one makes use of an UpdatePanel so that only that portion of the screen is refresh
0
 
surajgupthaCommented:
What are you trying to do or implement using the timers? with your columns?
0
 
allanmarkAuthor Commented:
I have a Footer (table row with columns) at the bottom of my page. I display various bits of information in these columns - the tiem is one of them.
0
 
surajgupthaCommented:
You mean current time? You could display time using javascript in that case.
0
 
allanmarkAuthor Commented:
Ok.

So I drop the timer control idea and use the script.

Looking at the sample you recommended at the beginning, what do I do? (bearing in mind that I am totally javascript ignorant (it is one of the things I will be attending to in the next week or so!  :)  :)  ).

0
 
surajgupthaCommented:
http://www.htmlgoodies.com/legacy/beyond/javascript/javatime.txt

Right click to view the source and use the javascript clock
0
 
allanmarkAuthor Commented:
Excellent! Got it showing the time on my page.

Is there any way of getting that time into a label or column in  a table?

Also, any recomendation for a good JavaScript primer?
0
 
surajgupthaCommented:
well if you are showing that in the table you might need to write more scripting but that will have to be custom tailored to the table structure/ datagrid u have.

About the Primer,
http://www.javascriptmall.com/learn/contents.htm
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now