I'm getting this error also. I renamed my form, just like he did. I have searched for a reply to this post but found none. Does anybody know how to make this error go away?
This error comes up if when tracing is turned on. The interesting thing is that it only occurs if you choose to change the name of your form tag ID. For example, say you just created a new ASP.NET form with the following ID:
<form id="WebForm2" method="post" runat="server">
Now say you want to rename the form ID to be "MyWebForm"
<form id="MyWebForm" method="post" runat="server">
When you change the ID the VS.NET IDE automatically changes the Inherits attibute as follows:
and the code-behind file is also updated by the IDE as such
public class MyWebForm : System.Web.UI.Page
Once this change is complete, if you turn on tracing on the page (i.e. Trace = "True") you will get the following error:
Multiple controls with the same ID 'MyWebForm' were found. Trace requires that controls have unique IDs.
This is very easy to reproduce. Does anyone know why this error occurs?