This is weird. I added a brand new Web Application project to my solution in Visual Studio 2008.
Created a master page. Made zero modifications. Created a new we
I encountered this error after editing a web part (.aspx) page in SharePoint Designer 2013. When I looked at the code in SPD, an H1 element near the top of the page was highlighted yellow. Hovering over that indicated that SharePoint:AjaxDelta was not closed before the H1. Adding the </SharePoint:AjaxDelta>
fixed it.
Weird because it appeared SPD introduced the error after I was working on listview web parts or a page viewer web part elsewhere on the page.
In my case I was loading a user control dynamically in a page and both the page and user control had the content tags
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
Removing this tag from the user control worked for me.
Here's another way using Visual Studio: If you do New Item in Visual Studio and you select Web Form, it will create a standalone *.aspx web form, which is what you have for your current web form (is this what you did?). You need to select Web Content Form and then select the master page you want attached to it.
Your web form shouldn't have all of that markup (like the <html>
tag). Since it has a master page, you just start with the content tag. Your aspx page should look like this:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebUI._Default" MasterPageFile="~/Site1.Master" %>
<asp:content id="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
This is the body!
</asp:content>
When you're adding a new aspx page make sure to check "select master page" in the "add new item" dialog.
You need to add asp content and add content place holder id correspond to the placeholder in master page.
You can read this link for more detail
Your web form should look like this:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebUI._Default" MasterPageFile="~/Site1.Master" %>
<asp:Content runat="server" ID="head" ContentPlaceHolderId="head">
<!-- stuff you want in >head%lt; -->
</asp:Content>
<asp:Content runat="server" ID="content" ContentPlaceHolderId="ContentPlaceHolder1">
<h1>Your content</h1>
</asp:Content>
Note that there is no <html>
tag