Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Remove aspx sites pages created with <Module> element

  Asked By: Loretta Pruitt         Date: Feb 28, 2009      Category: Sharepoint      Views: 488
 

I am trying to delete my custom aspx pages created with <Module> element. I
can access the pages like this:

currentWeb.GetFile(selectedPageItemUrl);

The selectedPageItemUrl variable has the url of file like :
http://server/siteCollection/pages/page1.aspx

After getting the file when I use Delete(), my application says that it removed
the file successfully but it's not removed. I am doing this in windows
application on button click which loads all my pages. When reload the
application, the pages are not shown after deletion but I can see the page on
frontend.

Is there any way that I can remove the page completely.

Tagged:              

 

1 Answer Found

 
Answer #1       Answered By: Israel Haynes          Answered On: Feb 28, 2009       

I suspect the problem is that you are deleting the file  attachment from the
library without deleting the library item that references the file. You need to
find the entry in the document library rather than use the GetFile method.

 
Didn't find what you were looking for? Find more on Remove aspx sites pages created with <Module> element Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].