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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:09:58+00:00 2026-05-28T00:09:58+00:00

Asp.net A.aspx I’m using JQuery to access an ashx file which loads control (

  • 0

Asp.net

A.aspx

I’m using JQuery to access an ashx file which loads control ( ascx ) which contains a GridView. The control content is being injected to the page…

When I do this:

   StringWriter writer = new StringWriter();
   HttpContext.Current.Server.Execute(page, writer, false);
   string output = writer.ToString();

It tells me that the GridView must be placed in a form section.

So I’ve created my Page

public class MyPage: Page
    {
        public override void VerifyRenderingInServerForm(Control control)
        {
            //base.VerifyRenderingInServerForm(control);
        }
    }

and inside of it I override this method. I’m using my page and everything is fine.

The question is why ? Why does it have to be in a form? It doesn’t have any inputs !

Also, if my ascx contains only <asp:Label ( runatServer) everything is fine and it doesn’t require placing it in a Form.

What am I missing ?

  • 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-28T00:09:59+00:00Added an answer on May 28, 2026 at 12:09 am

    It must not be inside of a form, but the only one who knows are you. This exception is also a way to prevent nasty errors and provide a clear error message. Only controls that can postback need to be nested in a HtmlForm control.

    • http://msdn.microsoft.com/en-us/library/system.web.ui.page.verifyrenderinginserverform%28v=VS.100%29.aspx
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using this tutorial: http://dotnetslackers.com/articles/ajax/Using-jQuery-with-ASP-NET.aspx The web service is invoked such as Service1.asmx/HelloToYou The default
well i have a asp.net aspx page, which references a css file have the
I have the list box control (ASP.NET Control On aspx page, language C# ).
With ASP.NET's view engine/template aspx/ashx pages the way to spit to screen seems to
ASP.NET has a reorderlist control http://www.asp.net/ajax/ajaxcontroltoolkit/Samples/ReorderList/ReorderList.aspx Is there anything equivalent (control, source code, ...)
I have a asp.net repeater control in a aspx page, with runat=server and an
I have a jquery accordion on an asp.net aspx weppage. Inside the panes, I
I am trying to use existing functionality which is embedded in a asp.net aspx
Hi I'm using jQuery AutoComplete Plugin in ASP.Net as outlined in the article below,
When using a cache manifest file within ASP.NET can I just add a standard

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.