The joys of ASP.net

As part of our group’s Imagine Cup entry this year, we have to program our application using Microsoft technologies, which basically means ASP.net, C#, the .Net framework and SQL Server. However, being from a PHP/MySQL background, I inevitably found this a little daunting to think about, but nowhere near as bad as the experience has actually been.

To be completely honest, first impressions count, even with something as geeky as a new programming language, and so far, my initial reaction has been one of horror and disbelief. Yes, it can only be one thing: ASP.net forms.

Just for a second, imagine a normal bog-standard HTML form. It would have an enclosing form element containing input elements and a submit button. When the button was clicked, it would submit the form to the address given in the form element. Sounds simple, no? Well, actually not if you’re trying to recreate the effect in ASP.net.

For some reasons, Microsoft didn’t think it important enough to ship Visual Studio with a built-in form element to drag and drop. Maybe this is because most page have to be enclosed with server-side form elements, but I’m not sure. In any case, I dragged and dropped ASP.net text boxes for a form, and then a submit button. I wrote the code behind the button to submit the information to the SQL Server. Sounds simple enough.

After many problems with SQL Server authentication (which were admittedly our fault), I found that, very ironically, Mozilla Firefox worked fine with the form, submitting the information as I would expect it to, but Internet Explorer didn’t do anything at all when the button was clicked.

I searched on the internet for hours, pulling my hair out trying to sort out this stupid problem. I tried every solution under the sun, but nothing worked. In the end, I gave up and went to lunch, but if this is the direction that everything is going to be heading in, then I can see ourselves getting into major trouble as the deadline looms…