Need to have an aspx page with a Feature in SharePoint 2010
Posted
by camit90
on Stack Overflow
See other posts from Stack Overflow
or by camit90
Published on 2010-06-13T12:59:17Z
Indexed on
2010/06/13
13:02 UTC
Read the original article
Hit count: 281
sharepoint
|feature
I have added a custom button to the server ribbon in SharePoint (I have used a feature with Farm scope, so that the button is visible throughout the various site collections).
For the elements of the feature, I have added a CustomUIExtension through which I want to load an aspx page on the click of the button.
<CommandUIHandler
Command="Test_Button"
CommandAction="javascript:
function demoCallback(dialogResult, returnValue)
{
SP.UI.Notify.addNotification('Operation Successful!');
SP.UI.ModalDialog.RefreshPage(SP.UI.DialogResult.OK);
}
var options = {
url: '/_layouts/CustomPage.aspx',
tite: 'Custom Page',
dialogReturnValueCallback: demoCallback };
SP.UI.ModalDialog.showModalDialog(options);"
/>
I have added the CustomPage.aspx and its corresponding code behind class to the 14 hive (inside 14/TEMPLATE/LAYOUTS). However when I install the feature and click the button, I get an error saying "Cannot load CustomPage".
I understand that I haven't deployed the assembly, but shouldn't the aspx page be compiled Just In Time?
© Stack Overflow or respective owner