Popups in asp.net

I want to display popups on an asp.net page, for example how the stream over stream shows the popups at the top of the site (you get a new answer to the question similar to orange), how can I write the code, is there a free source code or any link. thanks

+2


a source to share


5 answers


This is not a "popup", it is probably just a standard DIV that has height and content that changes dynamically. You can do a "view source" on the page to find the element, or use firebug (easier).



Once viewed, its div is called "notify-container".

+1


a source


Below are the steps to achieve what you want.

  • You have a div (container) to show your updates.
  • Create window window.setTimeout to execute JS function (AJAX)
  • In this function, check for updates from the server
  • Finally, if there are any updates, show them in the container div
  • When there are updates, again setTimeout makes it invisible for a specified period of time (say 3 seconds)


To achieve this very easily, use JS libraries like JQuery.

NTN

+2


a source


These days all this wizzery is usually done with jQuery

+1


a source


The asp.net ajax control toolkit has this. Check here.

+1


a source


I think you will find that this is done with a storage container at the top of the page, a timer to periodically request an AJAX capable method for updates, which replaces the container's content based on the response.

0


a source







All Articles