Monday, March 3, 2008

How to resolve "__doPostBack is not defined" error

Thanks to Julien Pinquié:

When I ran across this, I found that I'd closed a <script> tag referring to an external .js file with /> notation instead of <script></script>; the <script> tag doesn't accept this notation for whatever reason.

9 comments:

Stephen said...

Cheers, nice post. I just did the exact same thing when tidying up a master page. Who'd have thought such a change would effectively break my entire app!

elijahr said...

thank you! I had the same problem, after doing a little code cleanup. Makes sense, I guess... just not the first thing I would think. Much appreciated.

David Nilsson said...

Good post!

Unknown said...

Preserved some of my sanity! Thanks. Had this problem when cleaning up and updating a site to use master pages. Thought it was due to the master pages until I spotted this post.

yilimi said...

thanks for the tip!

Rafael Souza said...

thank you very much, resolved a big problem that i had.

Anonymous said...

I had this problem just today, but none of the solutions I found worked, unfortunately including yours. So if someone reads this and it doesn't work for them try this:

http://you.arenot.me/2010/11/03/asp-net-__dopostback-is-not-defined/

Cheers though for helping me through the process of working out what went wrong!

Unknown said...

Thanks boss, it's working for me

Shaun said...

Saved me a potentially lengthy debugging session. Cheers