Can we display a custom web part (developed in visual studio 2010) in a modal dialog pop-up? If yes then how can we do that... any tutorials or article?
Thanks!
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityCan we display a custom web part (developed in visual studio 2010) in a modal dialog pop-up? If yes then how can we do that... any tutorials or article?
Thanks!
You can show any page using eg SP.UI.ModalDialog. You could just add your WebPart to a page, and link to it:
<a title="aTitle" onclick="javascript:SP.UI.ModalDialog.ShowPopupDialog('http://link/to/page/with/webpart.aspx');return false;">
aLink
</a>
Yes. You can place web part in any page and show this page in dialog. How to call dialog: MSDN: SP.UI.ModalDialog.showModalDialog(options) Method
<script type=”text/javascript”>
function OpenDialog(URL) {
var options = SP.UI.$create_DialogOptions();
options.url = URL;
options.width = 600;
options.height = 400;
SP.UI.ModalDialog.showModalDialog(options);
}
</script>