There are several ways to call a modal popup from asp.net. You could code it on your own using JavaScript, or you could use existing frameworks like jQuery or Ajax Control Toolkit. As I use both of them, I decided to check with the Ajax Control Toolkit as this is already implemented and no further module needs to be referenced.
You could call the modal popup from the UI or from Backend. The current posting is just a reminder for me how to use it in backend. Continue reading
Category Archives: Ajax
Using JavaScript on listboxes in ASP.net
In my application I needed to have 2 listboxes and users should be able to move entries from the source list to the target list.
Using normal buttons would cause a postback on every click which is ugly of course. Additionally this could be done with JavaScript without problems. The only handicap: As the selection is done in the FrontEnd only, the Backend does not know about it and therefore you could not get the selections made. I’ve found several tips but no complete code so I put together some tips and post it here so you could easily copy it into your application.
A control is already associated with the element
Working in my asp.net 2.0 application I noticed the following error message for 3 days:
Sys.InvalidOperationException: A control is already associated with the element.
After closing the IE window with my application I got a second error:
Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method

