locked
UserControl inside SharePoint Content Page - Unexpected Error RRS feed

  • Question

  • Hello Everyone,

     I have created a Page using Sharepoint Designer (without association it to any MasterPage. Then I registered a user control Inside this which is working perfectly fine:

    <%@ Page Language="C#" %>
    <%@ Register src="~/_controltemplates/mDart2.0/FetchDataFromAit.ascx" TagName="ActionItems" TagPrefix="wssuc" %>
    <html dir="ltr" xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
    
    <head runat="server">
    <META name="WebPartPageExpansion" content="full">
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:PublishingContactPicture msdt:dt="string">, </mso:PublishingContactPicture><mso:PublishingContact msdt:dt="string"></mso:PublishingContact></mso:CustomDocumentProperties></xml><![endif]-->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>PAAG Report</title>
    <meta name="Microsoft Theme" content="classic 1011, default">
    </head>
    
    <body>
    <form>
    <wssuc:ActionItems ID="ActionItems" runat="server"></wssuc:ActionItems>
    </form>
    </body>
    </html>
    
    

    BUT

    when I create a Sharepoint Content Page using a MasterPage, and register a UserControl, It shows "Unexpected Error" in the browser.
    Have I missed something in the code for registering the UC ? Here is the code:

    <%@ Page masterpagefile="../_catalogs/masterpage/AITHome.master" language="C#" title="|" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" meta:progid="SharePoint.WebPartPage.Document" meta:webpartpageexpansion="full" %>
    <%@ Register src="~/_controltemplates/mDart2.0/FetchDataFromAit.ascx" TagName="ActionItems" TagPrefix="wssuc" %>
    <asp:Content id="Content1" runat="server" contentplaceholderid="PlaceHolderMain">
    <wssuc:ActionItems ID="ActionItems" runat="server"></wssuc:ActionItems>		
    </asp:Content>
    
    
    • Moved by Mike Walsh FIN Wednesday, April 13, 2011 6:27 AM Even without SPD it is still a customization q (From:SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010))
    Wednesday, April 13, 2011 6:02 AM

Answers

  • Please check the log files or the event log for more information on the error.

     OR

    Try to change the entry in web.config, by setting the CallStack value to "true" (<SafeMode MaxControls="200" CallStack="true">)

    Also set the custom errors to 'Off'  <customErrors mode=“Off“/>

    The above setting will give you more information about the error


    --Cheers
    • Marked as answer by Leoyi Sun Wednesday, April 20, 2011 8:36 AM
    Wednesday, April 13, 2011 6:29 AM