| DAYS | HOURS | MIN | SEC |
In code behind:
protected void Timer1_Tick(object sender, EventArgs e)
{
DateTime dt = DateTime.Now;
TimeSpan differ;
System.DateTime date1 = new System.DateTime(2015, 4, 1, 20, 10, 0);
differ = date1.Subtract(dt);
double t = differ.TotalSeconds;
if (t > 0)
{
double dy, h, m, s;
dy = differ.Days;
h = differ.Hours;
m = differ.Minutes;
s = differ.Seconds;
Label13.Text = dy.ToString();// +" Days " + h + " Hours " + m + " Minutes " + s + " Seconds left for celebration";
Label14.Text = h.ToString();
Label15.Text = m.ToString();
Label16.Text = s.ToString();
}
else
{
Timer1.Enabled = false;
time_enable.Visible = false;
theDiv1.Visible = true;
}
}
My question is that i visible thDiv1 div from Time1_tick(). But thDiv1 is not visible. How i will do?
7 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Santhakumar MunuswamyPosted Apr 21, 2015, 11:02 PM
could you please say whats your requirement and expected result
Jishu dasPosted Apr 21, 2015, 11:30 AM
---------------
---------------
..............
...........
Gowtham RajamanickamPosted Apr 21, 2015, 1:14 AM
Deepak VermaPosted Apr 20, 2015, 11:50 PM
Currently, you've written it like this:
---------------
---------------
Change it to:
---------------
---------------
Jishu dasPosted Apr 20, 2015, 10:52 AM
Deepak VermaPosted Apr 20, 2015, 12:01 AM
You should put 'theDiv1' inside the 'UpdatePanel1'.
Santhakumar MunuswamyPosted Apr 19, 2015, 11:54 PM
Try
Disable:
theDiv1.Attributes.Add("style", "display:none");
Enable:
theDiv1.Attributes.Add("style", "display:block");