09 September, 2011

Visual Studio 2010 and Maxthon 3

Sams Teach Yourself ASP.NET Ajax in 24 HoursI have been following the examples in the book ASP.NET AJAX in 24 hours, and I am doing it in both Visual Studio 2005 and Visual Studio 2010. While the book is targetted for use in VS2005, I did find that there is not much difference in the codes between VS2005 and VS2010, so I was finding the examples working in both IDEs, or rather, the examples are able to function properly regardless of which IDE is used.

Until...

I was coding the simple calculator, which is but 2 textboxes and a label, where the addends and the sum/total are entered/shown.

VS2005 defaults to using IE, and VS2010 uses whatever is the default browser that is set in your system, and it so happened that in the PC I am using at work, it was set to Maxthon (v3).

Somethings don't work properly...

The Ajax functionalities are all working fine with VS2005, but when coded in VS2010, something doesn't work here and there, now and then. It was not the same control, or the same functionality, everytime, from code to code, so for some time, I was baffled.

I was wondering whether it was due to the fact that the book was meant for VS2005, and I am using VS2010. I didn't get this for some time.

Sams Teach Yourself ASP.NET 3.5 in 24 Hours, Complete Starter KitFurthermore, when I tried things at home, the behaviour was the same. Of course, my default browser is Maxthon 3, so at least, in this aspect, the results were repeatable.

Then I don't know what I did, what I clicked, but perhaps in desperation, I clicked something, then the very simple Ajax-enabled calculator, which immediately adds up the two numbers (and works even when only 1 number is entered; adds to 0), started working.

Actually, the behaviour was consistent. One label was named A, and the other, B, and if A is not working, exchanging the label IDs will make B not work, and A work.

So finally I discovered what was causing the problem.

Maxthon 3's lightning mode.

I switched the debug tab to retro mode, and things started to work well and properly.

I went back to all the examples, and with each debug run, I switch to retro mode, and IE and Maxthon 3 handled all the Ajax functionalities as if they were one and the same browser.

Microsoft ASP.NET 4 Step by Step (Step by Step (Microsoft))And if you are encountering the same issue with Visual Studio 2010 and Maxthon 3, this could be the same rootcause - and solution.

Drop me a note if this post has been of help to you.

Till then. Happy Ajax-ing!


Enhanced by Zemanta