SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am creating a SharePoint-2013 web-part in that I have created Application Page.

In that page I am using <iframe> element only there are no any other elements just for testing. But it is giving me error like:

Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The base class includes the field 'frame1', but its type (System.Web.UI.HtmlControls.HtmlIframe) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlGenericControl).

Source Error:

Line 364:                <tr>
Line 365:                    <td>
Line 366:                        <iframe id="frame1" frameborder="0" runat="server" scrolling="no" width="100%" height="200px" style="margin: 0px; padding: 0px;" visible="false"></iframe>
Line 367:                    </td>
Line 368:                </tr>

Source File: /_layouts/15/OpportunityViewWP/MasterPage.aspx    Line: 366

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929 

Below is the screenshot.

Parser Error Message

But when I am adding the same <iframe> in Visual-Web-Part it works properly.

Can anyone help me to solve this problem.?

Thanks in advance...!!

share|improve this question

Go to your .cs designer file.

protected global::System.Web.UI.HtmlControls.HtmlGenericControl FinalScoreframe;
protected global::System.Web.UI.HtmlControls.HtmlIframe FinalScoreframe;

Will solve your problem. :)

share|improve this answer


<compilation targetFramework="4.0"/>


<compilation targetFramework="4.5"/>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.