Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4026104
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:55:43+00:00 2026-05-20T10:55:43+00:00

Error: A Web Part or Web Form Control on this Page cannot be displayed

  • 0

Error: A Web Part or Web Form Control on this Page cannot be displayed or imported. The type could not be found or it is not registered as safe.

This error comes out after I added a propety on my webpart. When I removed the property the webpart is working but when I added it back the error came out.

Here is the property that I added on my code.

    /// <summary>
    /// Property that contains the maximum number of answers allowed in the question
    /// </summary>
    /// <value>The number of answers allowed</value>

    const int default_intPollMaxAnswers = 2;
    private int intPollMaxAnswer = default_intPollMaxAnswers;
    [WebBrowsable(true)]
    [WebDisplayName("Maximum No. of Answers")]
    [WebDescription("Total no. of answers")]
    [Category("Poll settings")]
    [Personalizable(PersonalizationScope.Shared)]
    [DefaultValue(default_intPollMaxAnswers)]
    public int SPUserPollMaxAnswer
    {
        get { return intPollMaxAnswer; }
        set { intPollMaxAnswer = value; }
    }

This is the method where I consumed my property.. although I’m sure that this does not affect my webpart because I commented this method at the moment…

    private void InsertPollModalDialogForm()
    {
        this.Controls.Add(new LiteralControl(@"<div id=""divPollDialogForm"" title=""User Poll"" style=""font-size:8pt; display:none;"">"));
        this.Controls.Add(new LiteralControl(@"<table border=""0"" style=""width: 345px; height: 73px"">"));
        this.Controls.Add(new LiteralControl(@"<tr>"));
        this.Controls.Add(new LiteralControl(@"<td style=""width: 122px"">Poll title </td>"));
        this.Controls.Add(new LiteralControl(@"<td><textarea title=""What is your poll question?"" class=""text ui-widget-content ui-corner-all""  style=""width:100%;"" id=""txtPollQuestion"" rows=""2"" cols=""4""/></td>"));
        this.Controls.Add(new LiteralControl(@"</tr>"));
        for (int intCountAnswers = 1; intCountAnswers < intPollMaxAnswer; intCountAnswers++)
        {
            this.Controls.Add(new LiteralControl(@"<tr>"));
            this.Controls.Add(new LiteralControl(@"<td style=""width: 122px; height: 43px"" valign=""top"">Answer </td>"));
            this.Controls.Add(new LiteralControl(
                    string.Format(@"<td style=""height: 43px""><input type=""text"" 
                                    class=""clsAnswers"" id=""txtAnswer{0}"" 
                                    style=""width:200px""/></td>",
                                    intCountAnswers
            )));
            this.Controls.Add(new LiteralControl(@"</tr>"));
        }
        this.Controls.Add(new LiteralControl(@"<tr><td colspan=""2""><br /></td></tr>"));
        this.Controls.Add(new LiteralControl(@"</table>"));
        this.Controls.Add(new LiteralControl(@"</div>"));
    }

Below is the captured screen of the error page..

enter image description here

I hope somebody out there could help me solve my problem. Thank you in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:55:44+00:00Added an answer on May 20, 2026 at 10:55 am

    I realized that this issue has something to do with the wspbuilder but I am not really sure of that. I just encounter this kind of error most of the time when I rebuild the project and do the copy to GAC thing. I find out that if I rebuild the project then click on the copy to gac and click on the recycle app pools…twice or thrice, this error is gone and there I can go back to work. So annoying but somehow it works for me. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just wrote a new web part and now I am getting this error
Does anybody know how to find offending web part which causes this error ?
I hit this error while my web application was trying to execute a SELECT
Recently I ran into this error in my web application: java.lang.OutOfMemoryError: PermGen space It's
My web application crashes almost once a week due to not enought memory error.
I get this error when debugging my ASP.NET web application after I trigger an
I am receiving the following error message when trying to display my web part.
Business Objects Web Services returns error codes and I have yet to find a
Anybody ever had the error Installation of the Microsoft Expression Web 2 product has
I'm using Fedex's web services and getting an annoying error right up front before

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.