opening sharepoint pop up and closing pop up

–For opening pop up–
Write Below Script on page
<script type=”text/javascript”>
function openDialogModal() {
        var options =
            url: $(“#”).val(),
            width: 800,
            height: 600,
            title: $(“#”).val(),
            dialogReturnValueCallback: refreshCallback


        function refreshCallback(dialogResult, returnValue) {
            //SP.UI.Notify.addNotification(‘Operation Successful!’);
            var siteUrl = $(“#”).val();
            window.location = siteUrl

Add Attribute as

OnClientClick=  javascript : openSourceDialog();  return false;

–For closing pop up–
in code behind

Page.ClientScript.RegisterClientScriptBlock(this.GetType(), “CloseAndRefresh”, “window.frameElement.commonModalDialogClose(1, 1);”, true);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s