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 9306799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:15:06+00:00 2026-06-19T00:15:06+00:00

I was having some problems regarding the creation of a Page dynamically I do

  • 0

I was having some problems regarding the creation of a Page dynamically I do :

p = New Page();
Page myPage = new Page();
FormAtt ctrl = (FormAtt)myPage.LoadControl("path/to/my/file.ascx");  // here lies the gridview of evil
myPage.Controls.Add(ctrl);

Problem is i receive

Control ... must be placed inside a form tag with runat=server

Ok, so I’ve found out that I Need to override the VerifyRenderingInServerForm method to be able to call a formless page, But how can i override VerifyRenderingInServerForm since i don’t have a ASPX file.


ps: I have a related question and I don’t know what to do, since they are different questions but the solution goes to the same problema , and I gave up on the last solution – see : Form is Null in Dynamically created Pages

  • 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-06-19T00:15:08+00:00Added an answer on June 19, 2026 at 12:15 am

    You can try to use a custom class which already overrides VerifyRenderingInServerForm:

     public partial class MyCustomPage : System.Web.UI.Page
     {
        public override void VerifyRenderingInServerForm(Control control)
        {         
        }
    
        protected void Page_Load(object sender, EventArgs e)
        {
            var p = new MyCustomPage();
            FormAtt uc = (FormAtt)p.LoadControl("path/to/my/file.ascx");
            p.Controls.Add(uc);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a bread crumb bar in Delphi and having some problems regarding
Ive been having some problems regarding circular references when converting EF entities to json
I'm having some problems regarding a jQuery modal window. I'm a dba and SQL
Sir, I am having some problem regarding database in SQL Server. My project is
I am reading XOR linked list (from Wikipedia).But I am having some problems in
Currently having some problems- now = datetime.datetime.now() month = now.strftime(%B) site = wikipedia.getSite('en', 'wikiquote')
Im having some problems getting the Sticky Footer to work on my site. If
Im having some problems with a simple toggle in Safari. A really annoying flickering
I am having some problems with the PDF files that I make using the
I'm having some problems trying to figure out how to generate a Google Map

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.