Its a bit tricky when you want to use jQuery UI components in ASP.NET projects. There are some things that are not aligned between the two technologies, even though one is client side and the other is server side.
For starters both have their own Ajax scripts, so when incorporating jQuery UI components on a page you would have to decide which script (or better workflow) to use. I decided to go along with the ASP.NET way so as to keep working in the same way we did with the rest of the pages. The drawback is that the jQuery way is much more efficient.
Having these considerations in mind we want to create a component that will easily display a jQuery UI dialog with data from the server after an Ajax request. The data within the dialog can be displayed using any ASP.NET UI component, so as to be able to incorporate the new functionality with existing code and to allow the developers to work the same way they always did. For example if a system uses a custom calendar component that was created by the developers, it is already ready to be displayed with a jQuery UI Dialog without changing the code. All that is needed is to include the code to be displayed in a <div>. Here is an example of what will be needed in the aspx page:
Don’t forget to load the jQuery UI scripts on your page. You can download them at their site at http://jqueryui.com/download