Sitefinity ASP.NET CMS - Content Management System

KB Article

Home >  Support >  Knowledge Base >  KB Article
More than one FORM tag causes Sitefinity to crash - ID#711
Rating: Not rated
Last Modified: 5/8/2008
Related categories: Problems/errors;
 

Article information

 Article relates to  all Sitefinity versions
 Created by  Rebecca, Telerik

PROBLEM
When you edit a page with the RadEditor and insert a FORM, you are not able to use any of Sitefinity buttons:
  • you edit a layout and save it, but the [Confirm Changes] button does not do anything when clicked.
  • you click the [Save Changes] button, but the toolbar does not change, i.e. there is no [Confirm Changes] button.
  • you cannot submit layout changes for publishing and therefore cannot update the live site.

DESCRIPTION
In ASP.NET, only one <form> tag is allowed per page and Sitefinity already uses one <form> tag for each page. If you look at the HTML source, you will notice that Sitefinity is wrapping the entire page in a <form> HTML element.
When one inserts a control with another <form> tag in it, ASP.NET (and as a result Sitefinity) breaks.

SOLUTION
Remove the <form> tag from the custom form and use ASP.NET User Controls instead.

Another workaround is to set the form in <IFRAME> and set the TARGET attribute of the form to _parent.

We also recommend inserting the HTML related to the FORM in an .ASCX file and then to upload it to the site Do not use the RadEditor control to do this. 

 

Article Comments

There are no comments yet.
Please Sign In to rate this article or to add it to your favorites.