Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Application Page Not dispaying as a popup

$
0
0

Hi,

My requirement is

To call the application page post clicking on hyperlink on the webpart.

For this i have written code as below.

Problem here is I am able to browse application page through http://servername:portno/sites/sitename

But getting message as 'The webpage cannot be found' on the popup,after clicking hyperlink on the webpart.

//VisualWebPart1.ascx

<script type="text/javascript">
    var options = {    
        url: "/_layouts/TestPopup/testpage.aspx",
        title: "test page",
        allowMaximize: true,
        showClose: true,
        width: 625,
        height: 525,
        dialogReturnValueCallback: silentCallback
    };
    function open() { SP.UI.ModalDialog.showModalDialog(options); }
    function silentCallback(dialogResult, returnValue) {
    }
    function refreshCallback(dialogResult, returnValue) {
        SP.UI.Notify.addNotification('Operation Successful!');
        SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
    } 
</script>

<a href="javascript:open()">Click Here</a>

//testpage.aspx

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">

</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">

</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Application Page
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
My Application Page
</asp:Content>

Regards,

Sudheer


Thanks & Regards, Sudheer


Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>