TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jishu das
NA
106
7.2k
I dont enable a one div from another div
Apr 19 2015 10:25 PM
Here is my simple code:
<div id="time_enable" runat="server"><br />
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
<br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="1000" OnTick="Timer1_Tick" >
</asp:Timer>
<br />
<br />
<table style="position: absolute; top: 462px; left: 195px; width: 1010px; height: 124px;">
<tr>
<td><div class="circle"><asp:Label ID="Label13" runat="server"></asp:Label></div></td>
<td style="text-align: left; font-family: 'Arial Black';"><b style="text-align: center; background-color: #FFFFFF;">DAYS</b></td>
<td><div class="circle"><asp:Label ID="Label14" runat="server"></asp:Label></div></td>
<td style="text-align: left; font-family: 'Arial Black';"><b style="text-align: center; background-color: #FFFFFF;"> HOURS</b></td>
<td><div class="circle"><asp:Label ID="Label15" runat="server"></asp:Label></div></td>
<td style="text-align: left; font-family: 'Arial Black';"><b style="text-align: center; background-color: #FFFFFF;"> MIN</b></td>
<td><div class="circle"><asp:Label ID="Label16" runat="server"></asp:Label></div></td>
<td style="text-align: left; font-family: 'Arial Black';"><b style="text-align: center; background-color: #FFFFFF;"> SEC</b></td>
<td><b style="font-size: xx-large"><asp:Label ID="Label17" Text="=Remaining For Vote Day" runat="server" BackColor="White" Font-Bold="True" Font-Size="Medium" ForeColor="Blue"></asp:Label></b></td>
</tr>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="theDiv1" runat="server" style="height: 182px">
<table align="center" class="auto-style1" style="border-style: dashed; border-color: #008000; height: 179px; width: 366px; margin-left: 300px;">
<tr>
<td class="auto-style2"> </td>
<td>
<asp:Label ID="Label1" runat="server" Font-Bold="true" Font-Size="X-Large" Text="Voter login"></asp:Label>
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:Label ID="Label2" runat="server" Text="Name"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox1" runat="server" Width="177px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style2">
<asp:Label ID="Label3" runat="server" Text="Password"></asp:Label>
</td>
<td>
<asp:TextBox ID="TextBox2" runat="server" TextMode="Password" Width="179px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style2"> </td>
<td>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Log in" Width="65px" />
<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">New User</asp:LinkButton>
</td>
</tr>
<tr>
<td class="auto-style2"> </td>
<td>
<asp:LinkButton ID="LinkButton2" runat="server" OnClick="LinkButton2_Click">Forgot Password</asp:LinkButton>
</td>
</tr>
</table>
<asp:Label ID="label4" runat="server"></asp:Label>
</div>
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?
Reply
Answers (
7
)
MVC Table Filtering using AngularJS
How to show Print button on RDLC report in other browser ?