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

  • Home
  • SEARCH
  • 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 3936056
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:54:04+00:00 2026-05-19T23:54:04+00:00

This is a pretty simple question as i am new to asp.net i am

  • 0

This is a pretty simple question as i am new to asp.net i am trying to develop a contact us page and i am getting the following error.

“Control ‘ContentPlaceHolder1_nameBox’ of type ‘TextBox’ must be placed inside a form tag with runat=server”

The following is my code so far for that page.

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" CodeBehind="ContactUs.aspx.cs" Inherits="Craigavon_Aquatics.ContactUs" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<h2>
    Contact Us</h2>
<p>
    Please fill in the form below to contact us.</p>

<p>
    &nbsp;</p>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<table style="width: 100%">
    <tr>
        <td>
            Name: (Required)</td>
    </tr>
    <tr>
        <td>
<asp:TextBox ID="nameBox" runat="server" Width="278px"></asp:TextBox>                
        </td>
    </tr>
    <tr>
        <td>
            Email: (Required)</td>
    </tr>
    <tr>
        <td>

        </td>
    </tr>
</table>
</asp:Content>
  • 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-19T23:54:05+00:00Added an answer on May 19, 2026 at 11:54 pm

    Either place a wrapper <form runat="Server"> in your master page around the contentplaceholder, or on that page inside the <asp:Content> tag add a <form runat="server"> that surrounds your current content.

    Site1.Master

    <form runat="server">
      <asp:ContentPlaceHolder ...></asp:ContentPlaceHolder>
    </form>
    

    -OR-

    ContactUs.aspx

    <asp:Content ...>
      <form runat="server">
        ...existing HTML code...
      </form>
    </asp:Content>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably a pretty simple question. In C# I'm trying to write a
New to Javascript and jQuery, so I assume this is a pretty simple question.
This is a really simple question concerning a method. I'm pretty new to C#
I'm hoping this is a rather simple question, but I'm pretty new to MVC
This is a pretty simple question but I'm somewhat stumped. I am capturing sections
This is a pretty simple question and I'm assuming the answer is It doesn't
I think this is a pretty simple question. How do you an apache rewrite
hopefully a pretty simple question this time. I have a Select method in a
I'm pretty sure this is a simple question in regards to formatting but here's
I have a question that has pretty much been asked here: asp.net mvc Html.ActionLink()

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.