Loading...

“The control must be placed inside a form tag with runat=server” error is shown on some web part

Title

“The control must be placed inside a form tag with runat=server” error is shown on some web part

Description

“The control must be placed inside a form tag with runat=server” error is shown on some web part

Please wait...

The error does not happen to allQuest Web Parts for SharePointwebparts, in fact,Quest Web Parts for SharePoint regular Selector web part, Cascading Menu web part and etc. are working just fine, but ListView and ListForm all error out with slightly different messages.

For List View, the following error message is received: The following error occurs: Exception has been thrown by the target of an invocation.

For List Form, the following error message is received: The following error occurs: The control must be placed inside a form tag with runat=server.

Cause

This is a known issue with some of the Microsoft templates and master pages. It turns out that we have AjaxPanel control from Telerik that was used in List View and List Form control and they must be enclosed within <form> tag but also WebPartManager must be enclosed within the <form> tag. Please see this forum discussion for details (http://www.telerik.com/community/forums/thread/b311D-ghcda.aspx).

Resolution

To troubleshoot the issue, please look at the master page template and make proper correction. Please launch the web part page from IE browser where SharePoint Designer is available (it is needed to view and edit master page), clickSite Actions->Site Settings, fromGalleriesselectMaster Pagesand identify the master page you were using, clickEdit in Microsoft Office SharePoint Designer, from the designer, locate <body> and <form> tag and make sure WebPartManager element is inside the <form> tag.

Defect ID

This is a known issue with some of the Microsoft templates and master pages. It turns out that we have AjaxPanel control from Telerik that was used in List View and List Form control and they must be enclosed within <form> tag but also WebPartManager must be enclosed within the <form> tag. Please see this forum discussion for details (http://www.telerik.com/community/forums/thread/b311D-ghcda.aspx).

Leave a Reply