Deleting Objects
The PAPI has a Delete()
method for each channel, posting, template, template gallery, resource gallery, and resource object. We have created quite a few test objects in the repository, so let’s write a Delete dialog so that CMS Explorer can remove them:
1. Add a new web form to the CMSExplorer project and name it
Delete.aspx
.2. In Design view, drag and drop
styles.css
from Solution Explorer onto the web form.3. Toggle to HTML view and add a table with four rows:
<table> <tr> <td><h1>Confirm Delete</h1></td> </tr> <tr> <td> Click YES to permanently delete (Add literal to show the path of the item to be deleted here)</td> </tr> <tr> <td align="right"> (Add the Yes button here) <INPUT type="button" value="No" onclick="javascript:window.close();" style="width:120px"> </td> </tr> <tr> <td>(Add label for displaying error messages here)<...