i want to display the pop ups in asp.net page like how the stack over flow show the pop ups on the top of the site (you get the new answer for the question like that 开发者_如何学编程in a orange color) how can i write the code is there any free source code or any reference. thank you
Given below are the steps to achieve what you want.
- Have a div (a container) to show your updates
- Create a window.setTimeout to execute a JS function (AJAX)
- In that function check for updates from server
- Finally if there are any updates then show it in the div container
- When there are updates then again setTimeout to make it invisible over a period of time (say 3 secs)
To achieve this in a very easy fashion use JS libraries like JQuery.
HTH
Thats not a 'popup', its probably just a standard DIV that has its height and content changed dynamically. You can do a "view source" on the page to locate the item, or use firebug (easier).
After looking, its a div called 'notify-container'.
These days, all that wizzery is generally done with jQuery
The asp.net ajax control toolkit has that. Check it out here.
I think you'll find that's done using a holding container at the top of the page, a timer to periodically query an AJAX enabled method for updates which replaces the content of the container based on the response.
精彩评论