R – Using AspCompat in a SharePoint web part page

asp.netsharepointsharepoint-2007

I'm in the process of creating a SharePoint web part that needs to use a single-threaded COM component. I've discovered that in order to make this work well, I need to add the AspCompat="true" directive to the page where the web part will live. The problem is I can't seem to set up such a page.

I created a new blank web part page via the regular browser interface, then added AspCompat to it using SharePoint Designer. But that causes it to become un-ghosted and the SafeMode parser says that directive isn't allowed. I then modified the blank web part page template to include the directive and created a new page, but got the same error.

I basically need to set up a page within my SharePoint site that is stored in the file system, has that directive, and can contain my web part. How would I go about creating such a page?

Best Answer

I recently answered this question with some instructions that includes how to supply new site content page templates that you can use to host web parts. I think it's likely to work for you.

In your case, your aspx page template would have that AspCompat directive built-in.

Related Topic