Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi Guys,

I am doing a website in asp.net using C#. I want to a popup to appear with some text, picture and buttons after few seconds after the homepage loads. In the popup there will be 2 buttons, 1 of which will close the popup, the other will redirect user to another page with a value. How to achieve this? Please help...

Thanks.
Posted
Comments
abbaspirmoradi 8-Sep-13 13:13pm    
Try with <asp:Page OnLoadComplete="EventHandler" /> And show your popup

1 solution

Hello Aritra Nath,

You can use JavaScript function setTimeout for executing a code after 3 seconds.
Your code for popup window can be defined within the function.

var t=setTimeout(popupFunction,3000);

function popupFunction()
{
alert("popup");
}

with regards,

Sunil
 
Share this answer
 
Comments
Aritra Nath 9-Sep-13 1:25am    
ok thanks, 1 more thing.. sorry for my lack of knowledge, how do i add the buttons, texts, etc in this popup.. I dont want to use a modal popup extender, is it possible to do with a JQuery such as Fancybox? If so how?

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