I have a content page in an asp.net application that uses a form tag. There's only one on the page so I'm confused why its give me the error: Validation (HTML5): Element 'form' must not be nested within element 'form'
Heres the code:
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Site.Master" CodeBehind="Default.aspx.cs" Inherits="WebApplication6._Default" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MainContent">
<div>
<form id="form1">
<asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="SqlDataSource1" AllowPaging="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged">
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" ReadOnly="True" SortExpression="Id" />
<asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
<asp:BoundField DataField="Director" HeaderText="Director" SortExpression="Director" />
<asp:BoundField DataField="DateReleased" HeaderText="DateReleased" SortExpression="DateReleased" />
<asp:TemplateField HeaderText="Selection">
<ItemTemplate>
<asp:CheckBox ID="Selections" runat="server" OnCheckedChanged="CheckBox1_CheckedChanged1" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" SelectCommand="SELECT * FROM [Movies]"></asp:SqlDataSource>
<asp:Button ID="Button1" runat="server" Text="Select Movies" OnClick="Button1_Click" CausesValidation="False" />
<asp:TextBox ID="TextBox1" Text="First Name" runat="server"></asp:TextBox>
</form>
</div>
</asp:Content>
I have a form in my masterpage but that wasnt giving me problems yesterday..
Any ideas?