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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:26:21+00:00 2026-05-23T02:26:21+00:00

I am creating buttons and add them to a table that i want to

  • 0

I am creating buttons and add them to a table that i want to add onto a page:

    void MyButtonTable()
{

    TableRow myTableRow = new TableRow();

    foreach (var item in buttons)
    {
        TableCell myTableCell = new TableCell();
        myTableCell.Controls.Add(item);
        myTableRow.Cells.Add(myTableCell);

    }
    HtmlForm html = new HtmlForm();

   Table2.Rows.Add(myTableRow);
   Table2.BorderWidth = 1;
   Table2.BorderColor = System.Drawing.Color.Black;
   html.Controls.Add(Table2);
   Page.Controls.Add(html);
}

I need to add it through htmlForm and add it to the page..instead of adding the table straight to the page..
(i get Control ‘ctl02’ of type ‘Button’ must be placed inside a form tag with runat=server.)
but when i add html, i want to cancel the run at attribute..to prevent this exception from being generated:

A page can have only one server-side Form tag
  • 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-23T02:26:22+00:00Added an answer on May 23, 2026 at 2:26 am

    You need to add the table inside the existing <form runat="server">.

    As the error message states, you cannot have to server-side <form>s.

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

Sidebar

Related Questions

How can I add action to buttons of NSRunAlertPanel. Here's how I am creating
I am creating an actionbar with custom looking buttons that I put in the
I am creating some link buttons dynamically and try to access them in some
I'm writing a simple web page that displays a table. It the right column
New to javascript and jQuery, but I'm trying to dynamically add buttons and then
I am creating buttons on the fly and creating event handlers for them. When
I'm making an application that lets you add files and then compress them but
We are creating a Facebook Page Tab app. We want this to be installable
I am creating an Add-in for Outlook 2010. Once the button is clicked, the
Again, I was creating buttons dynamically based on this post and now I need

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.