If you get this error in your aspx page, you may end up spending several hours (like i did) before finding the actual cause. Actually, this error could cause due to multiple reasons. One of the reason is mentioned below:
A common scenario is when assigning an id to forms. ASP.Net automatically generates forms with ids form1, form2 etc. If your web form also contains the same id, then you might see this error.