Reputation: 87
I am fairly new to the ASP.NET so is there a way to make a button visible after a certain time?
<asp:Button ID="Button1" runat="server" Text="Click here" OnClick="btn_Click" Visible="False" />
Code-behind:
protected void btn_Click(object sender, EventArgs e)
{
Response.Redirect("~/site...." );
}
Upvotes: 2
Views: 323
Reputation: 4269
I think the following code can help you:
<script type="text/javascript">
function show()
{
document.getElementById("Button1").style.visibility = "visible";
}
function hide()
{
document.getElementById("Button1").style.visibility = "hidden";
}
window.onload = function()
{
hide();
setTimeout('show()', 30000);
}
</script>
the code at the bottom of the page to run after the page is created
Upvotes: 6