theform.__eventtarget is null or not an object



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:

ASP.Net generates a lot of javascript, form code etc based on the web form. When generating objects, it assigns an ‘id’ to it. If that ‘id’ clashes with one of our web form ids, you might see this error “theform.__eventtarget is null or not an object“.

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.

Thanks.



8 thoughts on “theform.__eventtarget is null or not an object”

  1. Ditto Satwant’s comment. You saved me a ton of time. There was no way I would have translated that error message to that problem without killing hours. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *