Using the Dialog framework in SharePoint 2010