This is a pretty simple question since I'm new to asp.net. I am trying to develop a contact page with us and I get the following error.
"Control 'ContentPlaceHolder1_nameBox' of type 'TextBox' should be placed inside the form tag using runat = server"
Below is my code for this 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>
</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>
Inkey source
share