Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using ajax timer in asp page to show digital clock.

The way i did is,on the timer_tick event

i wrote
C#
protected void Timer1_Tick(object sender, EventArgs e)
   {
       lblcurrenttime.Text = DateTime.Now.ToShortTimeString();
   }


so that on each tick,i am getting current time,the way is fine for me,

and i put this timer and lblcurrenttime LABEL control in an UpdatePanel.

i have 1 more Update Panel in the same page.and it contains two textboxes,list boxes etc...

the probelm is,on runtime,when i putting values to the textboxes in the second updatepanel,on each second,it becomes cleared,i think its closely related to that timer.....




Please help me to avoid the same
Posted
Updated 8-Feb-11 20:01pm
v2
Comments
Sunasara Imdadhusen 9-Feb-11 2:01am    
Added code formatting!
Sunasara Imdadhusen 9-Feb-11 2:02am    
Please provide .aspx code so we can check it!

1 solution

What UpdateMode you use for update panel?
Remember to set UpdatePanel's UpdateMode to Conditional.

Google [^] for more details.
 
Share this answer
 
Comments
kishore Rajendran 9-Feb-11 4:33am    
Very very thanx
Prerak Patel 9-Feb-11 4:40am    
You are welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900