I have created the modal dialog box using the following javascript code :
<script type="text/javascript">
function popThisUp()
{
var options = {
url: "http://somehost/SitePages/View.aspx?IsDlg=1",
width: 600,
height: 300,
title: "My First Modal Dialog",
};
SP.UI.ModalDialog.showModalDialog(options);
}
</script>
<asp:Button ID="btnDialogDemo" runat="server" OnClientClick="popThisUp()" Text="Click here" />
I want to display my view site page or any page in the modal pop up on click of button but my modal dialog pops up for a second and then just closes on its own. I don't understand what is the problem here. Please help guys