Need to have an aspx page with a Feature in SharePoint 2010
- by camit90
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?