ASP.net Pop up Alert without page load
In ASP.NET -->
I want to popup an alert window in the case of an event. I don't have a button, i do not load the page at that event. When I searched i got a lot of java script examples but I can't use them as they work either on a button click or on page load. I just want a pop window to come as soon as I capture a particular event. I keep checking for the events every 5 second, as soon as i capture one event, there is a switch case for the actions to follow according to the event capture开发者_StackOverflow中文版d. For one particular case, i need one pop up "Sorry" along with an OK button. Can someone tell me what to do.
Thanks
You could use a ModalPopup which is part of the Ajax Control Toolkit. I have used it many times to display messages, as it's much nicer than a javascript alert. If your event is captured in javascript, you can simply display it. If your event is captured in the ASP.NET code-behind, you can either display it via a page refresh, or you can put it into an UpdatePanel and trigger that, which will cause it to appear without your page refreshing.
精彩评论