473,386 Members | 1,702 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,386 software developers and data experts.

refresh display on event

I am using asp.net 2003/ visual c# 2003.
I have a timer event that sets a value assigned to a text box. With the
debugger, I can tell the event is being executed but the screen is not being
activated:
=========
private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
x = "timed event";
Text = x;
Text1.Value = x;
}
=================
In the same application is a button-click event that does work:
===========
private void Button1_Click(object sender, System.EventArgs e)
{
x = Text;
if ( x != "Hello" )
x="Hello";
else
x="Bye";
Text = x;
Text1.Value = x;
}
================

So how do I get the timer event to cause the display in the browser to update?

Nov 19 '05 #1
3 1259
"=?Utf-8?B?Qm95ZA==?=" <Bo**@discussions.microsoft.com> wrote in
news:41**********************************@microsof t.com:

So how do I get the timer event to cause the display in the browser to
update?


Web applications unlike a windows form application can't have their display
updated by a timer (unless it is during the request/page generation).

Events have to fire and complete during the request/generation of the page.
After a page is sent to the user, the page is diposed on the server.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 19 '05 #2
Boyd wrote:

So how do I get the timer event to cause the display in the browser to update?


Are you trying to do a clientside fill or a serverpostback and then
fill? It sounds like you are mixing the two up.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Nov 19 '05 #3
You can not do this Server Side,.

As ASP is request/Response based, it cannot push functionality onto the
Client without a request or client side script.

Solution:
Make a JavaScript time that can do this
or even easier
use a meta tag that refreshes the page every specified time

"Boyd" <Bo**@discussions.microsoft.com> wrote in message
news:41**********************************@microsof t.com...
I am using asp.net 2003/ visual c# 2003.
I have a timer event that sets a value assigned to a text box. With the
debugger, I can tell the event is being executed but the screen is not
being
activated:
=========
private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs
e)
{
x = "timed event";
Text = x;
Text1.Value = x;
}
=================
In the same application is a button-click event that does work:
===========
private void Button1_Click(object sender, System.EventArgs e)
{
x = Text;
if ( x != "Hello" )
x="Hello";
else
x="Bye";
Text = x;
Text1.Value = x;
}
================

So how do I get the timer event to cause the display in the browser to
update?

Nov 19 '05 #4

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

Similar topics

2
by: Lam | last post by:
Hi I try to write a C# windows program which will read some data from database and display on the screen. It has to refresh the output every 10 seconds because the database keep growing every...
9
by: PK9 | last post by:
I'm having an issue with the "Refresh" of an asp.net page. The refresh is actually calling my last onClick event. I thought that asp.net was supposed to be stateless in that it shouldn't...
17
by: Jim Little | last post by:
Hello, I'm driving myself crazy either because I'm missing something about ASP.NET, or what I'm trying to do simply can't be done. First, I am not using session variables to track state. My...
5
by: Tmajarov | last post by:
Haven't been able to find a clear answer to this... I am building an asp.net application and trying to enforce some work flow by displaying a form via the showmodaldialog method. I can get the...
5
by: Andrew | last post by:
Hi, Is there a javascript code to capture the browser's refresh button click event ? I know that I can handle that event with some c# code, but I was just wondering if that can be done using...
17
by: SamSpade | last post by:
picDocument is a picturebox When I do picDocument.Invalidate() the box paints. But if instead I do picDocument.Refresh() the box does not paint. What does Refresh do. I guessed it did an...
2
by: Sunil Shindekar | last post by:
Hi, I am writing the program which will capture the incoming HTML in web browser and do some modifications in it and then display in IE. It works fine when user gives new URL. But if user clicks...
12
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
2
by: Mikus Sleiners | last post by:
I have a control - textBox1 that is binded to objects propery - "Currency" and another control - textBox2 (read only) that is also binded to same propery. Now, i have a situation where textbox1...
5
by: mattcolenutt | last post by:
Scenario: Have a product form with an "image location" field. The image property uses this field to display the image. Problem: If an image location field has been changed, the image will not...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.