My precompiled ASP.Net 4 website has just developed a JavaScript error on a button click event that is supposed to postback to another page.
I have never seen this error before and the site was working. What the heck have I done? I'm not even sure what code to show you???
The page works fine when debugging in VS2010.
I was hoping to launch the site today so any help would be greatly appreciated.
I never actually found what was causing every button with a postback to generate the error. However I did find that an earlier version was working OK. So I reconsrtructed the site, page by page and the error went. Bar one!
This was on the order page and generated the same error (empty axd files etc). But this time I was able to track it down to this section of code:
Amending the code to...
...fixed it.
I was being a little over zealous with using ToString()! Hopefully this will help someone else with the same issue.