The ajax control toolkit contains a control called ModalPopupExtender. This extender allows you to create a dialog-like interface for webpages.When you use it like it is meant to use you would set a TargetControlID and a PopupControlID. The first is the control that will trigger the popup to show while the latter is the control that will be shown. That’s already nice, but what I needed recently was to show the result of a certain query in such a popup. This means that when I click the control that is pointed as TargetControl it would do a postback, execute some serverside code and then show that result in the browser. This is logical you might think but the problem is that when you click the control assigned to the extender as TargetControl you’ll see the popup immediately and only then the postback occurs.Okay how to solve this? Well add an additional linkbutton for example and make sure it is visible but has not text. You can then set the TargetControlID to this “no-text” linkbutton. Since there is no text, you can’t see it and since you can’t see it the user won’t click it. Nifty
Next you can have a second linkbutton the performs a callback to the server and executes some serverside code. If you put this linklabel in an asp.net ajax updatepanel you won’t notice the callback and you can use the ProgressIndicator functionality in asp.net ajax.At serverside you can perform some code execution and for example set a Label’s text proeprty to the result. Finally you can access the ModalPopupExtender and call the Show method that’s available this will cause the popup to appear.I really like this way of working because it allows for a nice userinterface experience and interaction with user.
*** UPDATE: I am sorry for all of you that wanted the sample code, with moving to this blog I lost it when my old blog went offline. I cannot provide you with the code anymore ***

Pingback: asp.net, c#,javascript